Lat and Lng provided by Autocomplete API

  • 1
  • Problem
  • Updated 4 years ago
Hi,

Latitude and Longitude provided by the Autocomplete API are sometimes pointing to a place outside of the city itself.

For example: Montevideo, Uruguay correct coordinates are -34.8752 (Lat) & -56.1646 (Lng), however, the API is reporting them to be -34.830002 (Lat) -56.000000 (Lng) which actually is outside of the city (and almost point to another different city!).

Any chance to fix this? I've noticed this is happening for a lot of other countries and cities too.

Here's an image showing the correct location and the one provided by the API:



Thanks
Photo of pepo900

pepo900

  • 3 Posts
  • 0 Reply Likes
  • confused

Posted 4 years ago

  • 1
Photo of Tim Roche

Tim Roche, Official Rep

  • 297 Posts
  • 24 Reply Likes
Hi,

The location provided is the observation location.  In this case it is the airport weather station.  This will not necessarily be in the city.
Photo of pepo900

pepo900

  • 3 Posts
  • 0 Reply Likes
Hi Tim,

I need those coordinates so I can use a Google map to show the city. Is there a reliable way by using the API to retrieve them? I've noticed that you do use the proper coordinates on your site:

http://www.wunderground.com/cgi-bin/f...

Thanks
Photo of Tim Roche

Tim Roche, Official Rep

  • 297 Posts
  • 24 Reply Likes
I would use google's geolocation services if you are looking for city data, our Autocomplete api is targeted to weather observations
Photo of pepo900

pepo900

  • 3 Posts
  • 0 Reply Likes
Fair enough!

Thanks Tim!