Im not sure if this should be posted here or under GMAPS.
My Issue is that Geocoding doesn't seem to be working, no matter what addresses/states/cities are inputted the results are input as lat 0 long 0 in the database. If I enter in the lat and long manually the markers show up fine and everything is working.
I tried updating to the dev snapshot, made sure my API key was correct, made sure geocoding configurations were set up properly in gmap locations (the US is set to use google, and the minimum accuracy is set to country).
The only other thing I found but have not tried was a thread mentioning that if you use shared hosting (I use rackspace/mosso) your site could share its IP with a lot of others and either be banned from geodcoding or always be at the limit. I am thinking this could be the problem but want to verify it is actually the problem before switching servers or getting a dedicated IP. Is there any way to see the geocoding response codes from google ( So I can verify that the problem is the shared IP's?) I looked at the documentation and couldn't seem to find anything about it.
Also, if the problem is that we are on a shared host is there any way to get around that other than getting our own IP?
And if anyone has any other ideas as to what the problem could be I would appreciate it!
Thanks!
Comments
Comment #1
rooby commentedChanging to support request as opposed to closing your bug report as 'closed (cannot reproduce)'.
The function google_geocode_location() in the geocode.in file in the geocoding directory is where you can debug the geocoding request and response.
You can use the devel module's dpm() and dd() functions for easy debugging.
I have just tested geocoding in the US with the latest dev version and it seems to be working.
I also have it set to country level accuracy and was able to get a proper result from the location: San Fransisco, CA, USA (I got nothing for CA, USA so I guess google doesn't have that data, although I wonder). I also got a result for the full street level address of the white house.
As long as you have geocoding enabled, an api key and a minimum accuracy level set reasonably it should work.
It also requires that the lon/lat fields of the location are empty, otherwise it won't geocode as it doesn't want to overwrite user data.
Try the debugging and see what comes up anyway.
Comment #2
corneo131 commentedThanks for the reply.
I am a super noobie at PHP and when I tried calling the dp function in it i got a php error =/. Looking at the google.inc document did make me realize that the status codes are printed in the watchdog row of the database.
I created a new node and was able to confirm that the reason that geocoding does not work with my site is because it is on shared hosting (Mosso/rackspace) and we share our IP with a lot of other sites, so we almost always receive a status - 620 error because we are almost always at the geocoding max =(.
Also, the only file I have in my geocoding folder is google.inc, not geocode.in I didn't see any errors other than the status code one so I assumed the name was just misstyped.
Im assuming there isn't a built in function that allows you to have the geocoding happen on the client side (and thus use their IP) or something like that. If there is let me know!
Thanks for the great module + help!
Comment #3
corneo131 commentedSorry I forgot to close the issue.
Comment #4
rooby commentedThe watcchdog logs for geocoding are super new (from this issue #925480: google.inc needs some watchdog love), glad they were of help to you.
Comment #5
chroid commentedHi all,
Just a follow up to this, I had similar diffiiculties with getting Geocoding to work.
As a side note the current 6.x-3 version I have doesn't seem to have those watchdog entries in the google.inc file, but I ended up DSM'ing the http request ($http_reply = drupal_http_request($url);).
This returned a 'connection timed out' error, which finally lead to the fact that the server was not configured to allow outgoing http requests.
Just somethingto be aware of, and thought I'd post in case!
Cheers
C
Comment #6
ikeigenwijs commentedHow did you solve it?
I did dsm() a lot:
$Key is ok
dsm($url); is also ok, when the url is used direcly in brower result is ok.
dsm($http_reply);//GOS the problem is here
returns code 110 connection timed out (to fast for a time out)
thx in advance
Comment #7
ikeigenwijs commentedComment #8
rooby commentedFixing title
Comment #9
legolasboClosing old D6 issues as D6 is end of life