最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Drawing routes on google maps - Stack Overflow

programmeradmin2浏览0评论

Is it possible to draw routes with google maps or any other map api? Like when you're looking for direction from point a to point b on google map with Get Directions button.

I'd like to draw a line that follows certain road but without the directions I don't need those. And if I can draw multiple lines between multiple points on the map that would be awesome.

Has anyone had experience with this before?

Is it possible to draw routes with google maps or any other map api? Like when you're looking for direction from point a to point b on google map with Get Directions button.

I'd like to draw a line that follows certain road but without the directions I don't need those. And if I can draw multiple lines between multiple points on the map that would be awesome.

Has anyone had experience with this before?

Share Improve this question asked Jun 26, 2013 at 9:14 Gandalf StormCrowGandalf StormCrow 26.2k71 gold badges179 silver badges268 bronze badges 1
  • 1 Example from the documentation – geocodezip Commented Jun 26, 2013 at 12:57
Add a ment  | 

2 Answers 2

Reset to default 1

You can either use the Directions API or, if you really prefer to ignore the directions Google generates, you can use the maps API drawing functions to draw your own lines on the map.

You can also employ "drawing library" https://developers.google./maps/documentation/javascript/drawing

But,this experimental tool cant specify colors nor line-thick via GUI. My enhanced example is at: http://members.j.home.ne.jp/tcltk-d/ge-navi.html (select "Drawing" view to draw)

发布评论

评论列表(0)

  1. 暂无评论