On Wed, Apr 2, 2014 at 2:07 PM, Patrick Laban <[email protected]> wrote:
> We wish to use the location headers for geotargeting. > Depending on how accurate you want the geotargeting to be, the header data provided should be good enough. As an alternative, what you can do is collect the lat/long from the header *X-AppEngine-CityLatLong* then look up the city name by using the Google Geocoding API: https://developers.google.com/maps/documentation/geocoding/#ReverseGeocodingor another geocoding service such as MaxMind: http://www.maxmind.com/en/geolocation_landing . The Geocoding API in particular can supply several different versions of the city name, and you can choose your preferred version. I realize that in your previous email, you commented about city names not being standardized: i.e. some cities have *St* while others have *Saint* in their names. But that shouldn't be a problem; the goal here is to have all users within a specific geographical zone share the same identifying string. For instance, as long as all users from *Saint Example City* all have "St. Example City" OR "Saint Example City" OR "ST Example City", does it really matter which string is used? During geotargeting, you can convert the city name back to coordinates (or simply save the coordinates themselves) and use those to select users for your services. You may also want to investigate the HTML5 Geolocation API: most modern browsers support it and it can provide much more accurate geolocation data: https://developer.mozilla.org/en-US/docs/WebAPI/Using_geolocation ----------------- -Vinny P Technology & Media Advisor Chicago, IL App Engine Code Samples: http://www.learntogoogleit.com -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/google-appengine. For more options, visit https://groups.google.com/d/optout.
