[wp-meta] [Making WordPress.org] #2823: Improve IP Geolocation Results

Making WordPress.org noreply at wordpress.org
Mon May 15 22:03:37 UTC 2017

#2823: Improve IP Geolocation Results
 Reporter:  iandunn  |       Owner:  iandunn
     Type:  defect   |      Status:  accepted
 Priority:  normal   |   Milestone:
Component:  API      |  Resolution:
 Keywords:           |

Comment (by iandunn):

 That sounds like a good idea to me. I think the detailed steps look like

 1. The initial request. The client doesn't have a location saved at this
   1. Client requests events near `{ip address}`
   1. API returns the `events` object like it does today, but no `location`
   1. Client parses the city name from first event (e.g. "Seattle"), and
 saves that as the location
 1. The second request. The client has a city name saved at this point.
   1. The client requests events near `{city name}`, just like it does
 today when a user manually types in a location
   1. The API matches the city name to lat/long coordinates using the
 Creative Commons data from geonames.org
   1. The API returns the `events` object, and a `location` object, just
 like it does today.
   1. The client saves the full `location` object as its location
 1. All future requests. The client has a saved `lat` and `long` at this
   1. These would be exactly the same as they are today.

 So, the client would have to make 2 requests instead of 1, but it would
 eventually get the same behavior as we have today. The client could do
 step !#2 asynchronously after the events received in step !#1 have been
 displayed, in order to make things a little smoother.

 All of the above only applies if the user hasn't manually entered a
 location. If they enter a location manually, then we skip step !#1, and go
 straight to !#2.

 @barry, does that sound right to you? If so, I'll get started on the
 necessary changes.

Ticket URL: <https://meta.trac.wordpress.org/ticket/2823#comment:17>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org

More information about the wp-meta mailing list