Hi
the module seems to work fine with single location URLs such as
getdirections/location/to/99
getdirections/location_user/to/66
etc.
but fails when using URLs such as
getdirections/locations/1/99
getdirections/location_u2n/66/99

start and end points in these latter cases show as the same point in the middle of the country. I am using Location modules with its cck field and Get Directions Fields.

tx
Simone

Comments

hutch’s picture

It's been some time since I looked at the Location module, but I have a test install of D7 with Location, Gmap and Getdirections 3.x. I tested the following:
getdirections/location_u2n/1/3
Where 1 is the uid of a user and 3 is the nid of a node.
Also swapped them around
getdirections/location_n2u/3/1
and two nodes:
getdirections/locations/3/2
and to a user
getdirections/location_user/to/1
They all worked fine.
I then ran git pull to grab the latest Location, it all still worked fine. Both node and user were configured using cck, each with their own instance, eg field_location and field_user_location. The modules location_node and location_user were not enabled as they are both broken.

So I cannot replicate your problem, please check that your location table has valid Latitude and Longitude entries, eg not 0 or the middle of your country. As the location module does its geocoding serverside bad locations are commonplace with this module.

hutch’s picture

Category: Bug report » Support request
cimo75’s picture

Hallo,

- i had first installed the Location User module, then realized I had to use a cck field and the provided Getdirection Field. After fixing that I checked ut the DB and noticed how the location instances were not deleted from the location table even if I delete all them from the UI.
Also it seemed like that if I changed/edited the location cck fields the Getdirection Fields were not updated.
Weird, I am now deleting all fields and entries from the DB and recreate them and will report back.

On a side note, would you advice to use other location modules? I am fine with any I just used Location as it is the most basic I knew about.

tx
Simone

hutch’s picture

Try Getlocations, it has a submodule getlocations_fields that will work better. Make sure you read the docs and READMEs so you know what you are doing.

cimo75’s picture

Ok I can confirm thatI had not the lat-lon coordinates in place, so after setting them manually it works properly. Have you got Location module to create those automatically formt he address fields?

tx
Simone

hutch’s picture

The Location module should create them automatically but is unreliable, you should also bear in mind that a poor address will not geocode properly, in some cases it may return 0,0 or it might return an arbitrary point that google has decided represents the center of your country or region.
Getlocations_fields does all its geocoding clientside ie in the browser before you hit submit, so you can see where your location is going to end up and you can if necessary move the marker to where you want it before saving it. Most of the other locative modules do their geocoding on the server so if it goes wrong the user does not know unless they are sharp-eyed and double check. Given a full address in a town or city in Europe or the Americas geocoding works well, in rural areas is is pretty poor and it does not really work at all in say rural Africa or rural Asia.