Google Maps shows “For development purposes only”

前端 未结 11 1839
旧巷少年郎
旧巷少年郎 2020-11-30 17:29

Google Maps show the message \"For development purposes only\" when I try to show it in my webpage:

How could I make this message go away?

My code i

11条回答
  •  孤街浪徒
    2020-11-30 18:10

    As recommended in a comment, I used the "Google Maps Platform API Checker" Chrome add-in to identify and resolve the issue.

    Essentially, this add-in directed me to here where I was able to sign in to Google and create a free API key.

    Afterwards, I updated my JavaScript and it immediately resolved this issue.

    Old JavaScript: ...script src="https://maps.googleapis.com/maps/api/js?v=3" ...

    Updated Javascript:...script src="https://maps.googleapis.com/maps/api/js?key=*****GOOGLE API KEY******&v=3" ...

    The add-in then validated the JS API call. Hope this helps someone resolve the issue quickly!

提交回复
热议问题