• <small id='WyNlZ'></small><noframes id='WyNlZ'>

  • <tfoot id='WyNlZ'></tfoot><legend id='WyNlZ'><style id='WyNlZ'><dir id='WyNlZ'><q id='WyNlZ'></q></dir></style></legend>
    • <bdo id='WyNlZ'></bdo><ul id='WyNlZ'></ul>

      1. <i id='WyNlZ'><tr id='WyNlZ'><dt id='WyNlZ'><q id='WyNlZ'><span id='WyNlZ'><b id='WyNlZ'><form id='WyNlZ'><ins id='WyNlZ'></ins><ul id='WyNlZ'></ul><sub id='WyNlZ'></sub></form><legend id='WyNlZ'></legend><bdo id='WyNlZ'><pre id='WyNlZ'><center id='WyNlZ'></center></pre></bdo></b><th id='WyNlZ'></th></span></q></dt></tr></i><div id='WyNlZ'><tfoot id='WyNlZ'></tfoot><dl id='WyNlZ'><fieldset id='WyNlZ'></fieldset></dl></div>

        在谷歌地图中仅显示特定国家(地区)

        时间:2023-09-05

          <legend id='MlsJQ'><style id='MlsJQ'><dir id='MlsJQ'><q id='MlsJQ'></q></dir></style></legend>

              <tbody id='MlsJQ'></tbody>
              <bdo id='MlsJQ'></bdo><ul id='MlsJQ'></ul>
              • <tfoot id='MlsJQ'></tfoot>
              • <small id='MlsJQ'></small><noframes id='MlsJQ'>

                  <i id='MlsJQ'><tr id='MlsJQ'><dt id='MlsJQ'><q id='MlsJQ'><span id='MlsJQ'><b id='MlsJQ'><form id='MlsJQ'><ins id='MlsJQ'></ins><ul id='MlsJQ'></ul><sub id='MlsJQ'></sub></form><legend id='MlsJQ'></legend><bdo id='MlsJQ'><pre id='MlsJQ'><center id='MlsJQ'></center></pre></bdo></b><th id='MlsJQ'></th></span></q></dt></tr></i><div id='MlsJQ'><tfoot id='MlsJQ'></tfoot><dl id='MlsJQ'><fieldset id='MlsJQ'></fieldset></dl></div>
                1. 本文介绍了在谷歌地图中仅显示特定国家(地区)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  有没有办法使用 google maps API 仅显示特定国家或地区?

                  Is there any way to show only a specific country or region using the google maps API?

                  推荐答案

                  可以使用 GeoMap API 来完成.请查看以下网址以供参考.

                  It can be done using GeoMap API. Please check following url for reference.

                  1) https://code.google.com/apis/ajax/playground/?type=visualization#geo_map

                  2) https://developers.google.com/chart/交互式/文档/画廊/geomap#regionsexample

                  这里是加载美国区域地图的示例.

                  Here is the example to load US region map.

                  <html>
                  <head>
                    <script type='text/javascript' src='https://www.google.com/jsapi'></script>
                    <script type='text/javascript'>
                        google.load('visualization', '1', { 'packages': ['geomap'] });
                        google.setOnLoadCallback(drawMap);
                  
                        function drawMap() {
                            var data = google.visualization.arrayToDataTable([
                              ['City', 'Popularity'],
                              ['New York', 200],
                              ['Boston', 300],
                              ['Miami', 400],
                              ['Chicago', 500],
                              ['Los Angeles', 600],
                              ['Houston', 700]
                            ]);
                  
                            var options = {};
                            options['region'] = 'US';
                            options['colors'] = [0xFF8747, 0xFFB581, 0xc06000]; //orange colors
                            options['dataMode'] = 'markers';
                            options['width'] = '556px';
                  
                            var container = document.getElementById('map_canvas');
                            var geomap = new google.visualization.GeoMap(container);
                            geomap.draw(data, options);
                        };
                  
                    </script>
                  </head>
                  
                  <body>
                      <div id='map_canvas'></div>
                  </body>
                  
                  </html>
                  

                  这篇关于在谷歌地图中仅显示特定国家(地区)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:如何将 HTML5 地理位置数据保存到 python Django adm 下一篇:从函数中获取经度和纬度值

                  相关文章

                  最新文章

                  <i id='9OFSs'><tr id='9OFSs'><dt id='9OFSs'><q id='9OFSs'><span id='9OFSs'><b id='9OFSs'><form id='9OFSs'><ins id='9OFSs'></ins><ul id='9OFSs'></ul><sub id='9OFSs'></sub></form><legend id='9OFSs'></legend><bdo id='9OFSs'><pre id='9OFSs'><center id='9OFSs'></center></pre></bdo></b><th id='9OFSs'></th></span></q></dt></tr></i><div id='9OFSs'><tfoot id='9OFSs'></tfoot><dl id='9OFSs'><fieldset id='9OFSs'></fieldset></dl></div>

                    <bdo id='9OFSs'></bdo><ul id='9OFSs'></ul>
                  1. <small id='9OFSs'></small><noframes id='9OFSs'>

                  2. <tfoot id='9OFSs'></tfoot>

                    <legend id='9OFSs'><style id='9OFSs'><dir id='9OFSs'><q id='9OFSs'></q></dir></style></legend>