在谷歌地图v3 API上绘制区域多边形
我需要在谷歌地图中绘制复杂的区域边界多边形。有没有办法轻松访问区域数据来绘制这些多边形?这些区域将是澳大利亚邮政编码区域。如果您在谷歌中输入邮政编码(不是映射正常搜索),例如“2454”,第一个结果是带有区域多边形的图像(也许此搜索仅在您从澳大利亚进行搜索时才有效)。我假设当谷歌正在绘制多边形时可以访问这些数据。
知道我如何访问这个边界数据吗?
我正在谈论的一个例子在这里
I need to draw complex regional bounding polygons in google maps. Is there a way to easily access regional data to draw these polygons? The regions will be australian postcode areas. If you type a post code into google (not maps normal search) such as "2454" into google the first result is an image with the regional polygon (perhaps this search only works if your searching from australia). Im assuming this data is accessible as google is drawing the polygon.
any idea how i would access this bounds data?
an example of what im talking about is here
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
谷歌无法以编程方式访问该数据。最好的办法是找到数据的 KML,然后使用maps.google.com 或 Google Maps API 加载 KML (http://code.google.com/apis/maps/documentation/javascript/layers.html#KMLLayers) 或使用类似的东西Fusion Tables 将 GIS 数据(或 KML)加载到融合表中,然后使用 Google Maps API 中的 Fusion Tables 图层 (http://code.google.com/apis/maps/documentation/javascript/layers.html#FusionTables)。
*请注意,Fusion Tables 层是实验性的。
That data is not accessible programmatically from Google. Your best bet is to either find KML for the data and then use either maps.google.com or the Google Maps API to load the KML (http://code.google.com/apis/maps/documentation/javascript/layers.html#KMLLayers) or to use somehing like Fusion Tables to load GIS data (or KML) into a fusion table, and then use the Fusion Tables layer in the Google Maps API (http://code.google.com/apis/maps/documentation/javascript/layers.html#FusionTables).
*Note that the Fusion Tables layer is experimental.
目前无法通过 Google Maps API 获取此数据。您需要找到边界数据的第三方提供商。快速查询会显示多个数据提供商,但我不确定是否在任何地方免费提供它们。获取数据后,它可能采用 GIS 数据格式,例如 Shapefile 或 KML 文件。这些可以加载到 Google Fusion Tables 中,或者可以使用 Google Maps API KMLLayer 直接加载 KML 文件。
This data isn't available through the Google Maps API at this time. You would need to find a 3rd party provider of the boundary data. A quick query shows several providers of the data, though I'm not sure if they're provided anywhere for free. Once you get the data, it's probably in a GIS data format, such as a Shapefile or a KML file. These can be loaded into Google Fusion Tables or KML files can be loaded directly using a Google Maps API KMLLayer.