简体   繁体   English

Google Maps API v3显示的标记不超过10个

[英]Google Maps API v3 are not displaying more than 10 markers

I am using Geocoder callback function for getting latitude and longitude value which is asynchronous. 我正在使用Geocoder回调函数来获取异步的纬度和经度值。

This works great for the 1st 10 items. 这非常适合第10个项目。 I will see a markers on the map as well as those 10 listed on my sidebar. 我将在地图上看到一个标记,以及在侧边栏列出的那10个标记。 However, the 11th item and beyond will not display anything. 但是,第11个项目及以后的项目将不会显示任何内容。 I am querying our internal database based on parameters set which often will produce 30+ rows returned in the database table which I am looping through. 我正在根据参数集查询内部数据库,该参数集通常会在我正在遍历的数据库表中返回30多个行。

Is there any way to display more than 10 addresses on google map. 有什么办法可以在Google地图上显示10个以上的地址。 or is there any need to purchase any license for get additional API for geocoder . 还是有必要购买任何许可证以获得地理编码器的其他API。

Thanks in advance ! 提前致谢 !

The Google Geocoding services are rate limited and subject to quotas (to prevent abuse), the (paid) Google Maps API for Business , does have higher limits. Google地理编码服务受速率限制,并受配额限制(以防止滥用),(付费) Google Maps API for Business确实有更高的限制。 The usual suggestion is to geocode the loctions offline, store the coordinates in your database , then use those coordinates to display the markers. 通常的建议是离线对地理编码进行地理编码,将坐标存储在数据库中 ,然后使用这些坐标显示标记。

If you can't store the locations in your database, you need to check the return value in the geocoder and delay when it returns over query limit errors. 如果您无法在数据库中存储位置,则需要在地址解析器中检查返回值,并在返回超出查询限制错误时延迟。 There are examples of doing that both here in SO and in the Google Maps API v3 group . 在SOGoogle Maps API v3组中都有这样做的示例。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM