How to use google maps simple api on localhost

后端 未结 3 965
陌清茗
陌清茗 2020-12-28 17:25

I have requested a link for embedding google maps on my website on

https://developers.google.com/maps/documentation/embed/start

and have au

相关标签:
3条回答
  • 2020-12-28 18:03

    I also had to enable the Google Maps JavaScript API.

    0 讨论(0)
  • 2020-12-28 18:08

    The problem was that they have their "quick start" out of date.

    https://developers.google.com/maps/documentation/embed/start

    It says you should only provide them with your API key but the thing is that there is a new version of the same website which they don't have links to from their guide but which you get a link to elsewhere( I got offered when in "billing" )

    The new service is called Cloud Console and I found the API on/off buttons there.

    https://console.developers.google.com/project/...

    You have to enable the "Static Maps API", "Google Maps API" and "Google Maps Embed API" and make sure to have your link in an iframe div

    0 讨论(0)
  • 2020-12-28 18:13

    As Dominik said, go here:

    https://console.developers.google.com/project/%your-project-name%/apiui/apis/library?q=google%20maps

    Enable both APIs:

    • Google Maps Embed API
    • Static Maps API

    Then go here: https://console.developers.google.com/project/%your-project-name%/apiui/credential

    • Create New Key
    • Browser Key

    And you're done.

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