Pages

Sunday, April 12, 2009

Google Maps API Key

Its been a while since I have blogged - thanks to the workload I have. This one was a challenge and had to crack it by accident, couldn't find any help on the net (atleast I couldn't find it).

The google maps API needs an API key provided by Google. This key will be generated for the domain name you specify. Even though I specified the IP Address correctly I kept getting the error - "The Google Maps API key used on this web site was registered for a different web site. You can generate a new key for this web site at http://code.google.com/apis/maps/."

Ok, before you get bored here is the solution. Go to the website properties in IIS and in the IP address drop down choose the IP which will be used by end users. This should be the key with which you should generate the API Key. Change your code and your site with google maps api should be up and running - no restarts required. If it doesn't work try restarting it though ;-)

Happy Mapping!