谷歌地图附近的路线和方向 [英] Google maps directions and area near route

查看:117
本文介绍了谷歌地图附近的路线和方向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



所以这里是路线方向附近的路线和区域(绿色不透明区域)



Directions API 并获取每个 step 的纬度/经度。

然后,我会使用步骤后的直线路径 。

编辑:



更好的解决方案是使用步骤

code>与
Polyline ,并给它一个足够厚的 strokeWidth


How I can do something like here in image with google map, Is anybody know ho to do this.

So here is directions and area near route directions (green opacity area)

解决方案

I would approach this by using the Directions API and getting lat/lng of each step.

I would then use the Polygons API to draw circles of a chosen radius, every x meters along a straight path following the steps.

EDIT:

A better solution would be to use the steps with a Polyline, and give it a sufficiently thick strokeWidth

这篇关于谷歌地图附近的路线和方向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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