tags:

views:

767

answers:

1

Yesterday I was for the fist time try google maps API, and I was generate API key for one of my public domains. Maybe I made a mistake, because I was test that key on my localhost and that was work fine, but when I try to publish that on my website I got the javascript alert which said that my API key is not valid for that domain, but I was generate that key for that domain. What is the trick?

+1  A: 

The key is always working for localhost, for testing purposes. But on other domains, the domain has to match the domain, you have registered the key with. So, did you control, if it really matches? No typo in the domain you registered yur key with? Or do you use a subdomain? Another problem could be, that Google wants your application (which uses the map) to be accessible from the web, without asking for passwords or similar hurdles.

Mnementh