Tip:
Highlight text to annotate it
X
MANO MARKS: Hi, I'm Mano Marks, Developer Advocate
on the Google Maps API team.
This is the second video in a series
of four designed to show you how to get started with the Google
Maps JavaScript API.
In the first episode of the series,
we covered creating and customizing your first map.
In this episode, we'll cover creating an API key.
Using an API key enables you to monitor your application's Maps
API usage and ensure that Google can contact you
about your application, if necessary.
If your application's Maps API usage exceeds the usage limits,
in a very rare condition, you must
load the Maps API using an API key in order
to purchase additional quota.
To get an API key, visit the Google API console at this URL.
If necessary, log into your Google account.
A quick note about which account to use.
If you're planning to use the map for your own personal use
and it'll always be in your control,
you can go ahead and use your own account.
However, if you're planning to use it
for an organization you work for,
consider using a shared Google account
that other people can access.
That way, if you're no longer working on the Maps project
or you aren't available for some reason,
others can access the account and receive any notifications
that might be necessary.
You can also accomplish this by sharing the project
with others.
But the ownership of the account and ownership of the project
should probably stay with the map.
That's doubly true if you're creating
the map for a customer.
To create a key, either select an existing project
or create a new one.
To create a new project, select the project list
and click on Create Project.
After you load or create a project,
click on the Services tab.
Then scroll down to Google Maps API v3
and click the button to turn it on.
Finally, click on the API Access tab.
Then click on the Create New Browser key.
You should see this box asking for domains.
Put the domains that you'll be using for this Maps API key.
This will prevent others from using the API
key on their sites.
OK, that's all there is to it.
In the next video, we'll cover using the API key
when you load the JavaScript API and the basic parameters
of the JavaScript loader.