Sunday, May 1, 2011

What should the google map api key be?

If I have this URL

http://domain.com/test3/eu/flickr-map/

What url do I use to generate the api key. I have put my code into production and what ever I do I can't seem to get an API key to work.

Please help.

From stackoverflow
  • Have you read the FAQ entry about the key and domains?

    You may need to sign up for a new key if you've effectively changed URL.

  • I would use "http://domain.com" as my URL when generating the key. That way you can use it within other folders on your site.

  • Sign up at this address to get a key for a specific domain then use that key when calling the Google JS files.

    Example: Say I entered a domain at the address above and got a key of:

    ABQIAAAAohKw8F5hsRCukQas4PbQXxS6jl7DzHm5BhVW2hKJ3KnZdh5-DxTaQN7mL8OMRAQtuGL6z2B0_Ql19Q

    I would then use that key in my calls like this:

    <script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAohKw8F5hsRCukQas4PbQXxS6jl7DzHm5BhVW2hKJ3KnZdh5-DxTaQN7mL8OMRAQtuGL6z2B0_Ql19Q" type="text/javascript"></script>
    

0 comments:

Post a Comment