Map Key API for local development

2,725 views
Skip to first unread message

DanYamins

unread,
Mar 13, 2009, 12:34:42 AM3/13/09
to Google Visualization API
Hi all:

I'm wondering how to use the map API for development on a local
machine.

I have an apache virtual host server set up on my machine. I'd like
to use the Google map api on pages served by this virtual host.
However, of course, when I try to load a page with a mapm I get the
message that:

"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/".


Of course, I can't generate an API key for my locally served pages.

What do I do?

I tried leaving out the key, but didn't work.

Any help much appreciated!

Thanks
Dan

DanYamins

unread,
Mar 13, 2009, 12:34:42 AM3/13/09
to Google Visualization API

Dan Yamins

unread,
Mar 13, 2009, 3:17:44 AM3/13/09
to Google Visualization API
Hi all -- I figured it out.  The idea is one can register an api key for your localhost.  So for example, if you're virtual host is at http://MyVirtualHostName,
then you can register a key for that through google's key registration service, and it will work.

Note that if you're not using serving the page and just want to look at a local page directly in the browser (e.g. file:///...) then you don't have to register anything, it will open properly with no key setting. 

Hope this is helpful for others!
Dan
Reply all
Reply to author
Forward
0 new messages