Geocoding
This is an open discussion with 18 replies, filed under Extensions.
Search
Thanks, Jonas. This will be very useful.
Geocoding
updated to version 0.7
on 1st of February 2011
- Symphony 2.2 compatibility
- removed Google Maps API key
Have you gone with the Google Maps API 3 now? I’ve been having fun writing a jQuery plugin with it.
Yep, so no more API key. But the extension only needs one simple request: http://maps.google.com/maps/geo?q=your-location&output=json
How is this field supposed to work? I don't really understand what do I have to do...
This works like the Reflection field. When you add a Geocode field to your section, you specify the XPath to get the value of an address from your entry. So if you also have a Postcode text input, then the XPath expression of the Geocode field might be:
{entry/postcode}
Upon saving, the Geocode field will take the Postcode text input's value, run it through the Google Maps geocoder, and stores the resolved latitude and longitude.
Does this output a distance at all like the map location field? my URL is this: stockist-locator/?range=15&postcode=XXXXXX
and when I append ?debug at the end, it doesn't work, so I can't see the XML output.
Cheers!
You don' have to reflect a single field. A combination of different fields is supported.
{entry/address}, {entry/zip-code} {entry/city}, {entry/country}
Does this output a distance at all like the map location field? my URL is this: stockist-locator/?range=15&postcode=XXXXXX and when I append ?debug at the end, it doesn't work, so I can't see the XML output.
I should work, I copied a lot of the code of the Map Location field :-)
[...] when I append ?debug at the end [...]
You should append &debug
when you already have some URL parameters set.
Ahh, I knew there must be away!
It's not outputting a distance for me. I practically followed this tutorial. My DS is filtered using this:
within {$url-range} miles of {$url-postcode}
Any ideas?
I'll have a look at it later.
Thanks, Nick. Got it.
@klaftertief: Cheers. If you want me to test anything, just give me a shout and I'll try as best as my knowledge goes!
Usage Limits Note: the Geocoding API may only be used in conjunction with a Google map; geocoding results without displaying them on a map is prohibited. For complete details on allowed usage, consult the Maps API Terms of Service License Restrictions.
Do these rules apply for the symphony backend if your showing the data with a map on the frontend of a site?
Would like to know how people are considering the terms at the moment as its not been a clear subject to look into.
I didn't know about this rule, thanks for pointing out.
Do these rules apply for the symphony backend if your showing the data with a map on the frontend of a site?
To be safe I'll add a map to the output of the field.
You only have to worry about that rule if you were going to collect geocode data and store it for other uses.
If you intend to have a map on the front, then don't worry about it.
@klaftertief I wouldn't worry about a backend map. It's up to a developer to ensure there's a map available on the frontend.
I would prefer the first option of adding the map, I guess their aim is to promote awareness of the product even if administrators are using it for collecting and storing data, without using a map to display the results, it seems to be a clear breach of the T&C's regardless of how its used on the front-end.
A license starts at $10,000 if they cut off your free supply.
Field: Geocoding
updated to version 1.0
on 13th of May 2012
You can opt in now to show a static map in the backend, both in the entries table and the publish panel.
Create an account or sign in to comment.
A new extension, “Geocoding” is now available for download. Comments and feedback can be left here but if you discover any issues, please post it on the issue tracker.