google-maps-api-3 - 我可以从谷歌地图 API 获取城市的人口和区号吗

标签 google-maps-api-3

我有这个代码

address = "11533"
geocoder.geocode({"address" : address}, function(results, status)
            {
                if(status == google.maps.GeocoderStatus.OK)
                {
                    map.setCenter(results[0].geometry.location);
                    var marker = new google.maps.Marker({
                        map: map,
                        position: results[0].geometry.location
                    });

                    var str = results[0].formatted_address + "";
                    var info = new google.maps.InfoWindow({
                        content : str
                    });
                    google.maps.event.addListener(marker, "click", function()
                    {
                        info.open(map, marker);
                    });
                }
                else
                    alert("Error in address");

我想添加有关城市人口及其区号的信息。有什么帮助吗?

谢谢

最佳答案

该信息(人口和区号)不作为 Google Maps API v3 的一部分提供。您需要为此找到一个数据源(它可能在 FusionTables 中公开)。在美国,人口普查数据是公开的。不确定从哪里获取区号。

关于google-maps-api-3 - 我可以从谷歌地图 API 获取城市的人口和区号吗,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11463933/

相关文章:

javascript - 在动态生成的 DIV 的鼠标悬停上显示 Google map 标记信息名称

javascript - 如何在多边形上打洞以在 Google map 上以干净的颜色显示每个多边形?

javascript - Google map API V3 - 元素 onClick - 中心 map /打开信息窗口

javascript - 使用传单将标记绑定(bind)到 map 中心

javascript - 具有多个标记和方向的 infoWindows 问题Google Maps API v3 中的显示变量

python - 为什么 Ubuntu 上的 PhantomJS 会被 Google map 注册为触摸设备?

javascript - 谷歌地图 V3 : Updating Markers Periodically

javascript - 如何使用他们的 API 设置 Google map 的样式

javascript - 谷歌地图标记 getPosition() 不工作 - '__e3_' 错误

google-maps - 如何以像素为单位偏移 Google map (API v3)的中心?