javascript - Google Maps won't work when API key is providedThis page was unable to display a Google maps element - Stac

I've been using google maps API V3 for a while now and it was working fine. Yesterday i tried addi

I've been using google maps API V3 for a while now and it was working fine. Yesterday i tried adding Static Maps API to my application and i encountered an error where the image was either not displayed at all or i get an error saying 'InvalidKeyOrUnauthorizedMapError' which tells me something must be wrong with the api key i've been using, but i use the same key with other scripts in my application and they worked fine. I double-checked with developer's console and made sure the Static Maps API is activated and the key is correct. Then i removed the api key from the static image link request and it worked, but i noticed all my other scripts, using this key stopped working displaying these errors:

This page was unable to display Google Maps Element

and the console says:

UrlAuthenticationCommonError: . Regenerating the api key didn't work. Removing the key or using a key from a different account with the same settings in developer's console solves the problem, but i need it to be under this account for billing purposes

TLDR; My application suddenly works only without API key or with a key from another google developer account with the exact same settings. What may be causing the problem with this particular account?

I've been using google maps API V3 for a while now and it was working fine. Yesterday i tried adding Static Maps API to my application and i encountered an error where the image was either not displayed at all or i get an error saying 'InvalidKeyOrUnauthorizedMapError' which tells me something must be wrong with the api key i've been using, but i use the same key with other scripts in my application and they worked fine. I double-checked with developer's console and made sure the Static Maps API is activated and the key is correct. Then i removed the api key from the static image link request and it worked, but i noticed all my other scripts, using this key stopped working displaying these errors:

This page was unable to display Google Maps Element

and the console says:

UrlAuthenticationCommonError: https://developers.google./maps/faq#errorcodes . Regenerating the api key didn't work. Removing the key or using a key from a different account with the same settings in developer's console solves the problem, but i need it to be under this account for billing purposes

TLDR; My application suddenly works only without API key or with a key from another google developer account with the exact same settings. What may be causing the problem with this particular account?

Share Improve this question asked Aug 20, 2015 at 14:48 Radoslav TrenevRadoslav Trenev 3731 gold badge6 silver badges18 bronze badges 1
  • Did you set up your key using the link provided here? – not_a_bot Commented Aug 20, 2015 at 19:52
Add a ment  | 

2 Answers 2

Reset to default 2

I guess it was some bug with my account. I disabled and deleted all APIs and keys, re-enabled and re-created them and the problem was fixed.

I fixed,

In the console say to add a link in this format:

*.example./*

I changed to this:

*example./*

And it worked!

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745617126a4636302.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信