Closed (fixed)
Project:
Location
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
26 May 2007 at 15:02 UTC
Updated:
4 May 2009 at 14:07 UTC
Hi, I cannot set a location to a node using the address fields.
After having entered the address in the fields, it is not geocoded:
- the map display in the submit form is not updated when I hit "tab" after having entered the address
- the lat / lon fields are empty in the database ("NULL")
[ The only way to set a location for a node is to either:
- click on the map => the lat / lon fields are automatically filled in, the marker added
- fill in the lat/lon fields => marker added ]
Question: how to get the entered address correctly geocoded to set the location to the node?
Comments
Comment #1
BobLouis commentedTo be more precise: I have no problems getting an address with maps.google.com, where geocoding is done ok.
Why should there be a problem geocoding that same address using these modules:
- location
- gmap
- gmap location module
Is it something I have missed in the settings?
Comment #2
BobLouis commentedOne more info -still hoping that someone will answer ;)
=> I cannot have even the Gmap macro working. When I enter an address and then hit "tab", the map remains unchanged.
Entering the very same address at maps.google.com gives back a map...
Comment #3
michelleFor the address geocoding, make sure you hit these hard to notice settings pages:
admin/settings/location/maplinking
admin/settings/location/geocoding
The map doesn't get updated when you hit tab; only after you submit.
On the macro page, the address textbox doesn't do anything useful for me, either.
Michelle
Comment #4
BobLouis commentedMichelle,
Thank you very much for your response.
I checked those two pages, where it is said :
- Maplinking : "None supported"
- Geocoding : "None supported - No service selected for country"
I am trying to find addresses in France, and I don't understand why it should not work for France since it works perfectly on the Google Maps service itself (maps.google.com). Why do we need a geocoding service when the one of Google is included in their service?
Comment #5
BobLouis commentedActually it seems that Google recently announced that geocoding is available for most Western European countries (besides USA/Canada).
See :
- http://www.google.com/apis/maps/documentation/#Geocoding_Etc
- http://www.developer.com/lang/jscript/article.php/3615681
But unfortunately, unless I am wrong, the location module still considers geocoding as "not supported" for these countries.
Do you know if it's going to be updated accordingly?
Comment #6
bdragon commentedComment #7
cm983 commentedi have the same problem the map wont show the markers unless i click on the map and set a lon/lat. why cant it use the info from the address fields?
Comment #8
danielb commentedsame problem. marker isn't placed, doesn't even zoom in on the suburb, typing in an address does bugger all...
Comment #9
danielb commentedHi guys, I have successfully made this work. Not for tabbing, but when you type in an address, save, then come back to the form.
I don't have a great understanding of this module so I'm not submitting a patch, but if you care to determine how I did it, I edited the file location.module, about line 732 there is an 'if' statement I had to modify the contents of.
If you compare the original code, and my code there, you will see I have added a call to the function gmap_geocode() from the gmap module to try and get a proper lat/lon for the marker, based on the location fields (you may have different fields so theres another reason this wouldn't work as a patch to the module), and then I try to use this value instead of the null value or whatever you normally get
Comment #10
yesct commentedThis issue is really old, and there have been lots of improvements; I think it might be in the latest version. Could someone please confirm this in the latest version? I'll mark it as postponed (needs more info).
Comment #11
yesct commented