Google Map error: InvalidKeyOrUnauthorizedURLMapError

前端 未结 10 598
[愿得一人]
[愿得一人] 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:44

    First you need to go to https://console.developers.google.com/ and select APIs.

    In Google Maps APIs select Google Maps JavaScript API and make sure you enable API for Google Maps JavaScript.

    Secondly, you need to create an API key:

    1. Go to Credentials
    2. Create new key and select Browser Key
    3. No need to specify any referrers

    So you should see Any referrer allowed after you save.

提交回复
热议问题