Google 地图 - API 调用过多?
我们遇到的问题是地图上的图钉并不总是出现。以下是我们系统的设置方式:
我们运行一个 C# 脚本,该脚本从我们的网站收集数据,对每个位置 ping Google,然后将数据(位置名称、纬度、经度)存储在我们的数据库中。该脚本每 10 分钟运行一次,通常会向 Google 发出 0 到 5 个请求。
我们有一张地图,它查询数据库并使用存储的纬度和经度信息在地图上绘制数据。在任何给定时间,地图上通常有 5 到 25 个图钉。
我的问题:每次我们向地图添加图钉时,这是否算作 API 请求?我们是否有可能超过请求/分钟阈值,因为如果地图连续加载 3 次,我们只对 API 进行了 75 次调用?
更新 好的,似乎发生的情况是,如果我等待 5-10 分钟,然后转到该页面或重新加载页面,则不会显示任何引脚。如果我随后重新加载页面,第一次重新加载通常也会导致零引脚。之后,我可以根据需要多次重新加载,并且每次都会出现图钉...
这是地图的链接:http://proplive.mkainc.com/map/map.php
更新2 现在的问题似乎是我们如何获取用于引脚的数据,而不是我们如何调用 Google 地图 API。
We are experiencing a problem where the pins on our map are not always appearing. Here is how our system is setup:
We have a C# script running which collects data from our website, pings Google with each location and then stores the data (Location Name, Lat, Long) in our database. This script runs every 10 minutes and normally makes 0 to 5 requests to Google.
We have a map which queries our database and uses the stored latitude and longitude information to plot the data on the map. There are usually 5 to 25 pins on the map at any given time.
My Question: Every time we add a pin to our map, does that count as an API request? Is it possible we are going over the requests/minute threshold because if the map is loaded 3 times in succession, we just made 75 calls to the API?
UPDATE
Okay, what appears to be happening is that if I wait a 5-10 minutes and then go to the page or reload the page, none of the pins show up. If I then reload the page, the 1st reload usually also results in zero pins. After that, I can reload as many times as I want and pins will appear every time...
Here is a link to the map: http://proplive.mkainc.com/map/map.php
UPDATE 2
The problem now appears to be with how we are fetching the data that is being used for the pins, not with how we are calling the Google Maps API.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论