buddy
buddy

Reputation: 428

How can I Get Google Map Api v3 key?

I'm trying to get the Google Maps API v3 key. I read a lot of tutorials all are about Google Map API V3 but when go to Google API console and in services I did not get this API. However, Google Map javascript API V3 is lies there but it gives the client ID not the API key.

enter image description here

Kindly guide me how can i get it?

Upvotes: 11

Views: 89222

Answers (2)

Ricky Mathew Kuruvilla
Ricky Mathew Kuruvilla

Reputation: 452

Go to https://console.developers.google.com/

  1. Under Google Map's Api's choose Google Maps JavaScript API
  2. Enable the Api.
  3. Go to credentials section.Choose create Credentials.
  4. Choose API Key from the popup,and then choose browser key from the proceeding popup.
  5. Use the following script in you web page.

    <script async defer src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap"></script>.

  6. Replace the 'YOUR_API_KEY' with your own api key obtained

Upvotes: 17

AlexB
AlexB

Reputation: 7416

Have you seen this link ?

  • Visit the APIs Console at https://code.google.com/apis/console and log in with your Google Account.
  • Click the Services link from the left-hand menu.
  • Activate the Google Maps API v3 service.
  • Click the API Access link from the left-hand menu. Your API key is available from the API Access page, in the Simple API Access section. Maps API applications use the Key for browser apps.

Then you have to use it in your webpages with

<script async defer src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap">

And replace YOUR_API_KEY by the API key you just generated. Here, initMap is the name of the method executed once GoogleMaps is fully loaded ; you can remove or rename this parameter depending what you need

Do you experience any issue with this step-by-step ? It worked for me.

Upvotes: 7

Related Questions