Is there a way to have Location pick the appropriate country based on the latitude/longitude entered when the node is saved?
1 Answer
I believe Location has the ability to be added with a CCK field. The coords can then be converted into a long address. From there you should be able to pull out the country.
If you want to get even fancier you can use OpenLayers to show the location on a map. Does that answer your question?
-
That is more or less right, you will need to make sure location has access to one of the geocoders for this to work. May 13, 2011 at 15:33
-
Well it's part of a large existing project where converting Location to CCK isn't going to happen, but if it's possible with how you say, then I suppose it's not a far cry from a custom module. Thanks :D– DanHMay 13, 2011 at 16:31
-
-
Yes there's already a ton of nodes with coordinates input, but the editors are pretty lazy and never both to input the address properly and sometimes they don't even select the correct country. I'm trying to use the address data for google rich snippets ultimately. OpenLayers looks like the way forward though, I'll try and push that :) thanks!– DanHMay 26, 2011 at 4:28