Google 地图 api 方向 用户定义的步骤
我有一个谷歌地图服务,上面标有商店。 我还有路线服务(然后您定义两个或更多地址,它会在这张地图上向您显示一条路线,请参阅谷歌地图 api 路线)。所以我希望通过这种方式向您展示最近的商店。当然,它也可能是位于我路上的下一条路的商店,所以它也应该包含在列表中。
到目前为止,我只发现了从 google 地图 api 获得的方向对象中的一系列步骤。但这些步骤是由谷歌预定义的,因此它们可能彼此太近,也可能太远(如果您的路线的一部分是高速公路或者您的路上没有任何特殊的步骤等)
所以,我想做的事。我想在从谷歌指示中获得的线路上制定自己的步骤(例如,每 500 名会议者将这些步骤放在我的线路上等),然后在每一步中搜索大约 200 名会议者的任何商店。
可以做吗?我在互联网上找不到这个想法的任何解决方案。
I have a google map service with the stores mapped on it.
I also have directions service (then you define two addresses or more and it shows you a way on this map, see google map api directions). So I waте to show the nearest stores to this way. Of course it could be the store located in the next streat of my way, so it also should be included to the list.
So far I just found only an array of steps in the directions object which I get from google maps api. But these steps are predefined by google, so they can be too close one each to other and they also can be too far (if a part of your route is a highway or there is no any special steps on your way etc.)
So, what I want to do. I want to make my own steps on the line that I get from google directions (for example to put these steps on my line every 500 meeters etc.), and after that to search every step for any stores around 200 meeters.
Is it possible to do? I cannot find any solution of this idea in internet.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我想我找到了解决方案。
这是如果有人遇到同样的问题
I think I found a solution.
Here it is if somebody will get the same problem