I have a node with a CCK Location field added to it. I am using a GMap to enter the location (latitude and longtitude only), no other fields are allowed to enter. However I would like to build a view that allows users to search the nodes by country. I am not sure how the link between the entered coordinates and the country is established though. Is it automatic? How can I build this type of view?

Thanks!

Comments

kirilius’s picture

Hi, any ideas?
Thanks!

kirilius’s picture

Is that even possible?

rooby’s picture

Status: Active » Fixed

There is such a thing as reverse geocoding, which will get the address when given lat/lon coordinates but the location module does not have that functionality yet.

Otherwise your user will have to enter the country manually when they enter the coords on the gmap.
It just means one extra field for the user.

Then you create a view using a relationship for your cck location field. You will find it under the Content part of the list of possible locations.
IN the view add the Location: Country filter and select your relationship for the "Relationship" option and expose the filter.

Then users can use the filter to select which countries to view locations for.

If you need reverse geocoding check the issue queue and see if there are any feature requests already. If there aren't you can add a feature request to add reverse geocoding.

Feel free to reopen this issue if any of this is unclear.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.