本文介绍了谷歌地图API,用户可以选择区域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要创建一个本地地图我的城市,人们可以用多边形覆盖面积,并得到他们的经度和纬度

I want to create a local map for my city where people can cover area with polygons and get their latitude and longitude

例如有一个世界地图,有人来了,他想掩盖我们那么他就可以简单地覆盖它并获取其边角和边框的纬度和经度

For Example there is a world map and someone come and he wanted to cover us then he can simply cover it and get its latitude and longitude of corners or borders

有什么办法或例如我搜索一下谷歌和网站,但都没有得到任何东西。

Is there any way or example i searched about it on google and Site both but didn't get Anything

对不起,我没有codeS我想主意,code或某事有帮助的。

Sorry I've no Codes i want idea, code or something helpful.

推荐答案

一个简单的搜索产生您还可以在<一发现很多更多的样本href=\"http://$c$c.google.com/apis/maps/documentation/javascript/demogallery.html\">http://$c$c.google.com/apis/maps/documentation/javascript/demogallery.html.

A simple search yielded http://www.the-di-lab.com/polygon/ and you can find a lot more samples at http://code.google.com/apis/maps/documentation/javascript/demogallery.html.

不幸的是上面的演示是一个缩小的JS。但在谷歌地图绘制多边形(区)的重要组成部分是
1.加载地图
2.陷阱点击事件和位置(经/纬度)
3.画线
4.最后,当接收到双击,关闭多边形

Unfortunately the above demo is a minified js. But the essential part of drawing a polygon (area) on google maps is to1. load the map2. trap the click events and the position (lat/lon)3. draw lines4. Finally when a double click is received, close the polygon

我很遗憾没有在手一个现成的样本。

I unfortunately do not have a ready made sample in hand.

这篇关于谷歌地图API,用户可以选择区域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-31 03:54