Google does not require a Google Maps API key for localhost. However, the Google Maps location module may be written to require this on all occasions in order to function. To be confirmed.
Google does not require a Google Maps API key for localhost. However, the Google Maps location module may be written to require this on all occasions in order to function. To be confirmed.
Comments
Comment #1
babbage commentedComment #2
Anonymous (not verified) commentedGoogle does require a key for localhost.
See http://mapki.com/wiki/FAQs#Key_Issues (your own URL):
and http://code.google.com/apis/maps/faq.html#keysystem
PS: There is no key required when using file: URLs (which is not the case here).
Comment #3
babbage commentedAh right, I was mislead by this and didn't read the other page properly obviously. And the localhost key is not always identical so I guess hardwiring it may not be ideal—but then since no other identifying information is provided at the point of getting the key, perhaps it doesn't matter if everyone was using the same localhost key. Hmm.
Comment #4
Anonymous (not verified) commentedEvery API key is tied to a Google account. See http://code.google.com/apis/maps/signup.html
If the same key is being used for "localhost"s all over the planet, I guess Google will pull the plug on that Google account rather quickly. Sharing a Google Maps API key looks like a bad idea.
Comment #5
babbage commentedYes, I realised it was tied to the Google account after my last post, and after some tests. Since there is no limit to the number of maps queries made by any one key, I doubt Google would be concerned about a few different localhost requests being made with the same key—the usage numbers for this module are small anyway. However, I still don't intend handing out a key linked to my Google account...
Comment #6
computer_jin commentedHi,
I am having issue before many days can any one help me how can i solve this or how can i disable google map api because its giving me the error on my site "google map api used for this website registered for different website".
Any one is there who solved this already ???
thanks,
Comment #7
Anonymous (not verified) commentedJust request an API key for http://localhost/ at http://code.google.com/apis/maps/signup.html
Comment #8
babbage commentedChanged to more accurate title. Sensible feature at add at some point in the future to allow both a localhost and live site key to be stored, perhaps, but it won't be a high priority to add.
Comment #9
babbage commentedIn order to use a separate key for your localhost installation, just add the following code to your settings.php file for that installation:
$conf['gmaplocation_key'] = '...';Replace the ... with the Google Maps API key you've been issued for http://localhost and it will override that stored in the database for your live site. This enables you to migrate your database between live and dev sites without experiencing difficulties with the Google Maps API key.
This solves the originally requested feature problem, without cluttering the module interface with a localhost key option—which many people would not use as many development sites are not run at http://localhost. Therefore, this issue will now be closed.
Comment #11
lassekt commentedI had the same problem on my local vhost setup. First I created an API Key using same dummy domain names, but apparently the domain has to be identical to the domain name of your site. Nevermind if its a temporary name, like mine http://drupal7.dev, just paste it in and you will get your working API Key.
Comment #12
vizaipenumaka commentedI am using Google Maps in my flex application however it runs good with http://localhost but its not running when localhost replaced to IP address(192.168.0.139).how can i get API Key for this.
Comment #13
jddeli commentedThis is not working.
There is no google map api for free.
Comment #14
jddeli commentedI got tired and decided that nothing happens with the google maps api.
I will deal again when I have time.
Too bad it does not work.
Comment #15
anil_89 commentedReally google not require api key at localhost host pass blank at localhost server ,
Comment #16
vako commentedGoogle doesn't require a key anymore, but this module needs it, how can we around it?