Generating Keys for Google Maps API Using the APIs Console

I’m writing this post because I was asked many times how to generate keys for the web sites that are still using Google Maps APIs version 2 (or using GMaps4JSF that is still using Google Maps APIs version 2). Many users were confused because Google removed the key generation mechanism from the Google signup page and some of the users thought that it is no longer supported to generate keys for Google Maps version 2 applications. Fortunately, generating new keys for GMaps v2 applications is still supported.

Here are the steps that I follow for generating new key for my Google Maps API version 2:

  • Login to the APIs console at https://code.google.com/apis/console with your Google Account.
  • Activate the Google Maps v2 service by clicking the “Services” link of the left menu and then enabling the service as shown in the figure below:

    Figure1

  • Click on the “API Access” link of the left menu, then click on the “Create new browser key …” button, the following dialog will appear to you:

    Figure2

  • Enter the URL of your web site, and then click on the “Create” button, you will find your GMaps v2 key attached in the API access page as shown in the figure below:

    Figure3

Finally you can use this key for your GMaps v2 script include as follows:

<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABCDEFGHIJK&sensor=false"
            type="text/javascript"></script>

This is all about; I wish that this tip can be useful for you.

References:
https://developers.google.com/maps/documentation/javascript/v2/introduction#Obtaining_Key.

This entry was posted in Google maps and tagged , , , , by Hazem Saleh. Bookmark the permalink.

About Hazem Saleh

Hazem Saleh has more than eleven years of experience in Cloud, Mobile and Open Source technologies. He worked as a software engineer, technical leader, application architect, and technical consultant for many clients around the world. He is an Apache PMC (Project Management Committee) member and a person who spent many years of his life writing open source software. Beside being the author of the "JavaScript Unit Testing" book, "JavaScript Mobile Application Development" book, "Pro JSF and HTML5" book and the co-author of the "Definitive guide to Apache MyFaces" book, Hazem is also an author of many technical articles, a developerWorks contributing author and a technical speaker in both local and international conferences such as ApacheCon North America, Geecon, JavaLand, JSFDays, CON-FESS Vienna and JavaOne. Hazem is an XIBMer, he worked in IBM for ten years. Now, He is working for Nickelodeon New York as a Mobile Architect. He is also an OpenGroup Master Certified Specialist.

8 thoughts on “Generating Keys for Google Maps API Using the APIs Console

  1. My partner and I stumbled over here from a different web page
    and thought I might as well check things out. I
    like what I see so now i am following you. Look
    forward to looking into your web page repeatedly.

  2. Hi,
    I need to generate a key for Flash Map API, and followd the above steps, but the map key is not working, does it work for flash Map API? Or do I need to take few other steps to make it work?

    Thanks

    Philip

Comments are closed.