我可以在Google地图路线上放置多少个标记,是否有限制? [英] Is there a limit on how many markers I can put on a google maps route?

查看:99
本文介绍了我可以在Google地图路线上放置多少个标记,是否有限制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以在Google地图路线上放置多少个标记,是否有限制?
如果是的话,如何克服它?



我的开发者说他不能在一条路线上添加超过10个标记!
是的,在这种情况下我无法在网上找到任何东西。

TIA

解决方案

根据文档 for v3:


允许的最大航点为8,加上原点和目的地。
Maps API Premier客户可以使用23个航点,加上出发地,
和目的地。


,当你包含开始和结束时,限制为10。因此,如果您想要更多,可以升级到Google地图专业版($$)或尝试解决此问题。



可能的解决方法是:


  • 彼此最接近

  • 为每个组做出指示,每组的起点是最后一组的起点
  • 如果您可以允许用户指定订单而不是优化代码,这样可以更轻松

  • 距离矩阵功能可能有助于确定航点之间的距离,因为它具有更高的点数限制。



另一个解决方法是回到Google Maps API V2,该地图仍然会出现为25的上限。



最后一项工作是做你自己的旅行推销员问题,但这不是微不足道的。


Is there a limit on how many markers I can put on a google maps route ? If yes, how to overcome it ?

My developer said he couldn't add more than 10 markers on a route !! And yes, I am unable to find anything on web in this context.

TIA

解决方案

According to the documentation for v3:

The maximum allowed waypoints is 8, plus the origin, and destination. Maps API Premier customers are allowed 23 waypoints, plus the origin, and destination.

So, yes, the limit is ten when you include the start and end. So, if you want more than that, you can either upgrade to Maps Premier ($$) or try to work around it.

A possible work around is to:

  • Group waypoints in groups of 9 that are closest to each other
  • Do directions for each group, with starting point of each group being the ending point of the last group
  • If you can allow the user to specify the order instead of optimizing it code, that makes it easier
  • The distance matrix feature may be to help figure out distances between waypoints, as it has a higher limit for number of points.

Another work around is to go back to Google Maps API V2, which still appears to have the larger 25 limit.

A last work around is do your own implementation of the traveling salesman problem, but that is not trivial.

这篇关于我可以在Google地图路线上放置多少个标记,是否有限制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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