2

So I signed up for a Google Maps API key and the documentation I got after doing so says to load the Javascript Maps API, use the following code:

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

In using that code snippet I can't get the Google Maps Tutorial working so I changed the script tag above to match the one in the tutorial:

<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>

And that one seems to work fine and doesn't have a reference to my API key... if that works fine is there any reason to get and use the API key?

Thanks!

1 Answer 1

3

As far as I remember, the V3 API doesn't require an API Key anymore (it was required with V2 of the API).

In your first code sample, you are using API v2.
But, in your second portion of code, you don't specify an API version -- in this case, I suppose it uses the default version, which currently is v3.

Sign up to request clarification or add additional context in comments.

1 Comment

Martin: That explains it... I am intending to use the v3 API so I guess signing up for the API key wasn't necessary. Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.