Hi Antti, We do a lot of geolocation with Magnolia and here are my notes:
- Using the HTML5 JS location API produces the best results but only if you are willing to display a confirmation to the user asking for permission and are primarily targeting mobile devices. - For everything else we use a combination of MaxMind (non-free) and geoPlugin (free) to do an IP address based lookup. This can be incredibly inaccurate. I don't have true statistics but from what I've seen on our projects I'd say it's maybe 50% accurate. - To cover most uses we want to try and find both the latitude and longitude of the visitor and their postal code. - Location lookups can be expensive so we cache the results in the session and often also in a cookie. - Because location lookups get cached and can be inaccurate, we always give the user the option to override the location we found by entering a postal code. Our sites are primarily US so we purchased and use a database mapping US ZIP codes to lat/lng. *** All of the above typically happens as an Ajax request to a page/controller that is excluded from the Magnolia cache. Now that we have a user's location we do all sorts of fun stuff like displaying location aware content (We have paragraphs that can be configured for certain zip codes or proximity to those zip codes), weather-aware content, etc. Tom On May 21, 2012, at 2:38 AM, Antti Hietala (via Magnolia Forums) wrote: > Hi everyone, > > We are planning a code tutorial about geolocation. The idea is to use a > publicly available geo API to detect a website visitor's location, then use > that information to deliver relevant Web content. > > How do you use geolocation information on your site today? How would you like > to use it? > > Reply to this thread with ideas. We will use your suggestions to build a > meaningful case example. > > Thanks, > Antti > > -- > Antti Hietala > Technical Writer > Magnolia® Yes, we're open. > > -- > Context is everything: > http://forum.magnolia-cms.com/forum/thread.html?threadId=a0d03a12-708c-4229-ae52-8a111bb59a4f > > > ---------------------------------------------------------------- > For list details, see http://www.magnolia-cms.com/community/mailing-lists.html > Alternatively, use our forums: http://forum.magnolia-cms.com/ > To unsubscribe, E-mail to: <[email protected]> > ---------------------------------------------------------------- > -- Tom Duffey [email protected] 414-751-0600 x102 ---------------------------------------------------------------- For list details, see http://www.magnolia-cms.com/community/mailing-lists.html Alternatively, use our forums: http://forum.magnolia-cms.com/ To unsubscribe, E-mail to: <[email protected]> ----------------------------------------------------------------
