[wp-meta] [Making WordPress.org] #3476: Kilometers range for the nearest meetup
Making WordPress.org
noreply at wordpress.org
Thu Feb 22 00:33:28 UTC 2018
#3476: Kilometers range for the nearest meetup
-------------------------+------------------
Reporter: Mte90 | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: API | Resolution:
Keywords: 2nd-opinion |
-------------------------+------------------
Comment (by dd32):
The events API returns meetups within a 100km *square* and WordCamps
within 400km. That actually means Meetups can be as far away as 140KM and
WordCamps 565KM if they were in the far corner of the square around the
searched location.
We use a bounded square for performance (Much easier to calculate and
query on squares than circles).
The API also only shows the next 3 events, as such, in your `Mantova`
example once the event on the 22nd expires it'll show the Verona event.
WordCamp Torino would also be displayed, but is also off the bottom of the
list, which https://core.trac.wordpress.org/ticket/41112 will fix
Here's the raw API response for that:
https://api.wordpress.org/events/1.0/?location=Mantova
In the case of Italy, it does look like 3 events isn't a good number,
especially with the number of cities in a small area with events around
the same date. I have 5 meetups around me and the only reason `3` works
is because they're spread out over the month.
I can see various arguments which can be made here:
- Reduce the radius
- Query by square radius, then apply a circle radius on the results to
limit it to 100km
- Order by distance then date - I don't believe this would have the
intended effect for many locations, especially when GeoIP was used for a
location rather than a entered location
- Display at least 3 events, showing all events happening in the next ~10
days
- Increase the number of events which can be shown - Setting this per-
locale wouldn't be out of the question IMHO.
cc @iandunn for ideas.
--
Ticket URL: <https://meta.trac.wordpress.org/ticket/3476#comment:1>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org
More information about the wp-meta
mailing list