Google Map中的边界 [英] Boundaries in Google Map

查看:127
本文介绍了Google Map中的边界的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为我的网站使用Google地图,并且想要创建城镇边界,如下面的屏幕截图所示。



问题:在V3 API中似乎没有任何功能可以执行此功能。我相信它涉及检索在该区域周围形成多边形的路径的Latlng。
如何获得所需积分的Latlng?
$ b

截图

解决方案

好的,假设您已经有了一条定义为Polyline的路径,那么您可以调用。getPath()函数,它返回LatLng对象的MVCArray。我假设你的问题的答案是你怎么得到所需要的点数的?


I am using Google Maps for my website and I want to create boundaries of towns and cities, as shown in the screenshot below.

Problem: There seems not to be any feature in the V3 API to perform this function. I believe it involves retrieving the Latlng of the path that forms a polygon around the area. How then do you get the Latlng of the points needed?

Screenshot

解决方案

ok, assuming you already have a path defined as a Polyline, you can then call the .getPath() function which returns an MVCArray of LatLng objects. I assume that answers your question "How then do you get the Latlng of the points needed?"

这篇关于Google Map中的边界的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆