让用户在Google地图上绘制曲线? [英] Letting users draw curved lines on a google map?

查看:528
本文介绍了让用户在Google地图上绘制曲线?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

感谢,
亚历克斯

$

b $ b

解决方案

您可能必须在Google地图上使用某种图层。我知道有一个云应用可以让你在谷歌地图上拼字游戏,但它使用flash来嵌入谷歌地图scribblemaps.com/...我不认为有可能使用两点来创建一个曲线也许超过两点。



如果我根据您的网站正确理解您的应用程序,您希望实现的目标是让用户开辟一条小路?如果是这种情况,也许你可以创建一个表单,用户可以提交他们已经闪耀的试验的Lat Lng坐标,然后使用Polyline绘制类似于这个谷歌地图绘制曲线

但是,如果用户只想知道如何从点a到点b等,那么您可以使用 DirectionService DirectionRenderer ,然后设置 DirectionsTravelMode google.maps.DirectionsTravelMode.WALKING ,并在地图上呈现方向,让用户知道如何在地图上绘制路线和实际路线指示来加息路线。


Does anyone have any examples or source for letting users draw curved maps from point a to point b?

Thanks, Alex

解决方案

you might have to use some sort of layer on top of google map. I know there's a cloud app that allows you to scrabble on a google map, but it uses flash to embed the google map scribblemaps.com/… i don't think it's possible to use two points to create a curve perhaps more than two points.

If i understand your application correctly, based on your website, the goal that you wish to achieve is to let users to "blaze a trail"? If that is the case maybe you can create a form where the users can submit Lat Lng coordinates of the "trials" that they've "blazed," and then use Polyline to draw the curve line similar to this google map draw curved line.

However, if users just want to know how to hike from point a to point b and etc, then you can use DirectionService and DirectionRenderer, and set the DirectionsTravelMode to google.maps.DirectionsTravelMode.WALKING and render the direction on the map that way so the user would know how to hike a route with directions drawn on the map + actual direction instructions.

这篇关于让用户在Google地图上绘制曲线?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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