Google Map API Issue. Using without API key

2019-08-15 02:43发布

"Our Google's MAP implementation was working fine when suddenly an alert was being prompt by Google informing to any visitor that Google's MAP was deactivated in our site because it didn't have the correct domain references or because the key was wrong; the same key was working fine in one of our sub-domains, which we use for development purposes, so we were pretty sure that the issue didn't rely on our end. We also double checked the settings on Google's developers console and everything is setup properly.

At the end we removed the key from the API call temporarily until we find a solution; what are the consequences of not including the key and what recommendations could you give us to solve this issue?

We are also using Google's Page Speed technology.

1条回答
祖国的老花朵
2楼-- · 2019-08-15 03:13

One thing I tried was to make sure that the Referer patterns shown in the Google Developers Console were sufficiently generalised, e.g. *.mysite.com/* rather than mysite.com

This apparently helped but further testing was inconsistent with the alert shown almost always on Windows Safari (5.1.7) and Firefox (29.0.1). In contrast, it was rarely shown on Safari on iOS.

As my web app is unlikely to make 20000 requests a month, I decided to ditch the key and use <script src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>

So far, this has worked without any apparent issues.

查看更多
登录 后发表回答