I want to start doing some gmapping...

I know i need to sign up for an API key before i can use any of the functionality.

Then it dawned on my that i'm developing all of my sites locally on my localhost server (e.g. none are live) and the majority of them do NOT have **registered** domain names!

I *do* however use **LOCAL** domain names for my local development sites. I achieve this by adding entries to my localhost hosts file (.eg. www.example.com, www.example2.com, www.example3.com all point to 127.0.0.1 my localhost) and then i adjust my httpd.conf virutal hosts directives accordingly. So for all intensive purposes my browser thinks i'm using an actual domain name as the host.

Qs:

1) Will google be able to recognize these **local** domains that aren't registered and live on a public web server if i apply for key for it? I imagine if my local domain is sent as a referrer it would but i'm not certain?

and if this doesn't work, how does google expect people to try out their api for non registered domains?

2) This is an offshot of question 1. I actually have registered domains for 2 of the sites i'm developing that have cheesy parked pages. However, i'm developing those sites locally on my localhost with local domain names per my host file / virtual hosts config explained earlier. Will these local sites not be able to access the keys because the public parked pages take preference.

This is probably a very silly question but any help would be greatly appreciated. I imagine it really has to do with the domain name that is sent in the referrer key, unless google does a reverse lookup on the ip of the referrer to determine the host. I'm not sure which method it uses and nothing in their documenation gives an answer to this question.

I could sign up and determine if this works now but i really don't want to set up a google account unless i know it's going to work.

thanks

75% of my sites are being developed without
I just went to apply for a google api key but i don't have a registered domain name yet (e.g. i'm developing locally on my localhost). Note, when i develop locally, i am actually using a local host/domain name (e.g. www.example.com) that routes to localhost server at 127.0.0.1. Do you know if google api will work with that? If not how do people get around trying out google api without actually having a domain? I can't find an answer on their site. Note even if i had a registered domain with a parked page and i was developing the actual site offline, would google still serve my gmap pages locally?

7) Do you know if gmap is smart enough to post a marker based solely on city and state? In otherwords, say you want to create a map of logged in users based on their location information in a profile but the profile only has city state (no zip or other pertinent info).. just curious

8) Do you know if it's possible to make the gmap NONdraggable and NONresizable with a macro option/parm?

Comments

newdru’s picture

Sorry but i have some extra stuff at the bottom of the previous post that is repetiton of the top 2/3.. Just ignore if it you like. I was going to post some of the extra stuff as a separate issue.

thanks

bdragon’s picture

1) I've tried it. It works. Google only cares that the api key matches whatever the browser is reporting the referrer as.
2) Google has no way of knowing what IP the webpage is being served off of. It is based on the HTTP Referer header sent by a web browser when travelling between pages.

newdru’s picture

Sweet! thanks bdragon!

bdragon’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)
ragavendra_bn’s picture

Thanks guys. I was able to set it up in my localhost by adding

127.0.0.1 www.example.co.in localhost

in my /etc/hosts and can see the map

I din't change anything in httpd.conf

wil that matter.

Clément’s picture

I also have the same problem.

So I added the line in my hosts file:
127.0.0.1 localhost site-1.tld

I do not know it ask for key that it works.
I tried with:
http://localhost
http://127.0.0.1
http://site-1.tld but without success ...

The three tests do not work, I click on register, I have a message that tells me that the key is not valid for this site.

Is this you could help me? Thank you in advance.

truyenle’s picture

localhost domain name works for me too.