Google Map error: InvalidKeyOrUnauthorizedURLMapError

前端 未结 10 520
[愿得一人]
[愿得一人] 2020-12-01 18:04

I am developing in JavaScript/HTML/CSS an app that uses Google Maps. I am getting the following alert dialog box:

\"This page was unable to display a Google Maps ele

相关标签:
10条回答
  • 2020-12-01 18:46

    Go to APIs menu and find "Google Maps JavaScript API" after you open it just press "Enable API"

    0 讨论(0)
  • 2020-12-01 18:48

    After a lot of trial and error this worked for me (by Eduardo. Thanks !)

    The URL that needs to be authorized is the one in the Referrer header for the requests the browser sends to Google to load the API.

    Under Browser Credentials > REFERERS

    Add these

    1. .example.org/
    2. www.example.org/*
    3. http://www.example.org
    4. http://example.org
    0 讨论(0)
  • 2020-12-01 18:50

    After lots of referrer combinations, deleting and re-creating credentials i realized that i didn't enabled "Google Maps JavaScript API". What a shame. :)

    For anyone who is having trouble to get google maps api work please check if the API enabled first.

    0 讨论(0)
  • 2020-12-01 18:53

    If you have been setup all configuration like api key etc, and you still got the error, please enable all your mandatory APIs regarding to google maps.

    Like:-

    Google Maps Embed API
    Google Maps Geocoding API
    Google Maps Geolocation API
    Google Maps JavaScript API

    0 讨论(0)
提交回复
热议问题