1

We are using ObjectiveC's Google Maps module and fieldtype http://devot-ee.com/add-ons/google-maps, which allows a user to choose a location on a map to obtain the longitude and latitude which is saved to the entry (the longitude and latitude is used in search results for a "results near x miles" list).

Our users are already entering an address to display for the listing, so is it possible for the Google Maps add-on to automatically get the lat and long from the address so we do not have to offer the map for them to pick a location in addition to entering their address?

3
  • You should definitely be able to do this. Can you post an example of some template code? Also, are you using the search/results tags? – Justin Kimbrell Sep 6 '13 at 11:59
  • I am not sure template code will help. I am using a Safecracker form to enter an entry, the field is {field:location}, which is a Google Maps field, it shows this Module's Google Map to pick a location. I dont want to use this field, but I would like Google Maps to enter the long lat automatically when I create an entry from its address fields. So I dont have code that is not working, I just dont have any kind of code or setting that would allow this feature so wondered if it exists. – Laurence Cope Sep 8 '13 at 13:37
  • I've revised the question to make it a little more clear – Laurence Cope Sep 8 '13 at 13:46
1

Ah, right. So I think you need Geocoder, which does exactly what you want. You can simply omit the Google Map field on the front-end, and have Geocoder plot the address for you after the form has submitted.

https://objectivehtml.com/geocoder

3
  • Aha! A different add-on by them! I did not think to look! I will give this a go and feedback, but sounds right. Thanks a lot. – Laurence Cope Sep 9 '13 at 20:55
  • It is a different add-on but it's really an expansion pack to Google Maps for EE. It won't work unless you have Google Maps installed. ;) – Justin Kimbrell Sep 10 '13 at 11:29
  • I'd be interested to know the end result if you got this to work? – paulcripps Nov 30 '15 at 23:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.