谷歌地图api用户可以选择区域 [英] Google maps api user can select area

查看:82
本文介绍了谷歌地图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

抱歉,我没有我想要的代码、代码或有用的东西.

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

推荐答案

一个简单的搜索产生了 http://www.the-di-lab.com/polygon/,您可以在 http://code.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 to 1. load the map 2. trap the click events and the position (lat/lon) 3. draw lines 4. Finally when a double click is received, close the polygon

不幸的是,我手头没有现成的样品.

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

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

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