如何将地图区域作为用户输入扑来?
我设法从代码上实现了Google地图上的图形区域,但也希望用户绘制其特定区域,然后在任何给定的地图上显示。
任何帮助将不胜感激。谢谢你!
I managed to implement drawing areas on Google Maps from code but would also like the user to draw his specific area then show it on any given Map.
Any Help will be appreciated. Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有关交互式绘图检查:
https://developers.google.com/maps.com/maps.maps.maps.maps.maps.maps.maps.maps.maps /documentation/javascript/示例/绘图工具
有一个多边形工具:
您可能有兴趣用代码绘制多线线。阅读更多信息:
https://developers.google.com/maps/maps/maps/documentation/documentation/javascript/javascript/形状
为此,您需要一系列经度/纬度坐标。下面的示例取自Google API的文档:
For interactive drawing check:
https://developers.google.com/maps/documentation/javascript/examples/drawing-tools
There is a polygon tool:
You might be interested into drawing a Polyline with code. Read more at:
https://developers.google.com/maps/documentation/javascript/shapes
For that you would need an array of Longitude/Latitude coordinates. The sample below is taken from the Google API's documentation: