Page MenuHomePhabricator

Nearby feature for maps
Open, Needs TriagePublic0 Estimated Story Points

Assigned To
None
Authored By
lilients_WMDE
Mar 17 2022, 2:01 PM
Referenced Files
F35049763: Screenshot from 2022-04-13 14-37-38.png
Apr 14 2022, 9:57 AM
F35010005: nearby.gif
Mar 17 2022, 2:01 PM
F35010007: nearby.png
Mar 17 2022, 2:01 PM

Description

Inspired by the Special:Nearby we want to add the option to display nearby articles in a Kartographer map at an article page.

nearby.gif (512×465 px, 191 KB)

design spec

Requirements (MVP)

  • Implement behind a feature flag
  • Add a button to dynamic maps, to show a “nearby” layer. Always disabled by default.
  • Buttons should not have icons (including the existing "external maps" button).
  • Display a map marker for other articles geolocated within the currently shown map area
  • Style map markers to match Kartographer and show as separate from user-added markers T315861
  • Use geosearch API as the source of articles (show only articles from current wiki)
  • When marker is clicked, the standard pop-up appears with the article name shown as a linked title and the description has the short description (from wikidata) and the page preview image. It behaves like current marker pop-ups. Example:
    nearby.png (339×284 px, 97 KB)
  • Show the most relevant (determined by CirrusSearch) articles T307208
  • Determine maximum radius (and expand as far as possible). Uses longest diagonal from viewport so that the whole visible map will have results.
  • Add auto-refresh: markers should refresh and reload most relevant on move and zoom. T315547
  • Desktop only, do not add feature to mobile yet (hide on mobile) T315281
  • Implement metrics for tracking usage, T315972 needs a subticket for show nearby specifically.

Out of scope

  • Static maps

Open questions

  • Find out as early as possible if the planned feature implementation requires a security and/or performance review. See T304076#8160891
  • How do the other tools get their data? Check for caching mechanisms.
    • Apps use geosearch, which is performant.
    • Wikivoyage Nearby uses statically-produced files, not a pattern we want to follow.
    • Data is locally cached on the client and merged with new query responses.

Next steps (post-MVP):

  • Add pin grouping T308227
  • Determine possibility for mobile support T326787
  • Continue accessibility review and improve T308320
  • Potentially: If needed, add refresh button to show new results after the user has moved within the map to change the bounding box. Possibly for mobile only. T327097
  • Potentially: Improve styling of pop-up/article preview

Related tools

WikiShootMe, Wikinity, Wikimap, Geopedia, WIWOSM (docs)

See also: https://meta.wikimedia.org/wiki/Community_Wishlist_Survey_2022/Miscellaneous/Show_nearby_or_related_articles_in_maps

Related Objects

StatusSubtypeAssignedTask
OpenNone
OpenNone
ResolvedNone
ResolvedAndrew-WMDE
Resolvedawight
ResolvedAndrew-WMDE
DeclinedNone
Resolvedthiemowmde
ResolvedWMDE-Fisch
ResolvedWMDE-Fisch
Resolvedthiemowmde
ResolvedWMDE-Fisch
ResolvedWMDE-Fisch
DeclinedNone
ResolvedWMDE-Fisch
InvalidNone
ResolvedNone
OpenNone
ResolvedNone
Resolvedthiemowmde
ResolvedNone
ResolvedNone
Resolvedthiemowmde
ResolvedNone
ResolvedBUG REPORTthiemowmde
ResolvedNone
DeclinedNone
ResolvedAndrew-WMDE
ResolvedNone
ResolvedWMDE-Fisch
ResolvedBUG REPORTWMDE-Fisch
ResolvedNone
ResolvedWMDE-Fisch
ResolvedNone
Resolvedthiemowmde
Resolvedthiemowmde
Resolvedthiemowmde
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
OpenNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedBUG REPORTNone
ResolvedMareikeHeuerWMDE
ResolvedNone
ResolvedNone
ResolvedNone

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Change 835119 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/Kartographer@master] Consider thumbnail width/height when rendering nearby popups

https://gerrit.wikimedia.org/r/835119

Change 835163 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/Kartographer@master] [DNM] Remove icons from nearby and external maps buttons

https://gerrit.wikimedia.org/r/835163

@ECohen_WMDE, I think it was a while ago that we talked about the icons on the two buttons in the bottom right corner of a fullscreen map. A pin for the nearby feature and an external link icon for the other button. Should we remove these?

@ECohen_WMDE, I think it was a while ago that we talked about the icons on the two buttons in the bottom right corner of a fullscreen map. A pin for the nearby feature and an external link icon for the other button. Should we remove these?

Yes, both should be removed. Thanks for remembering! I kept not finding the time to make the ticket for these. If you wouldn't mind doing it, that would be great.

Change 835163 merged by jenkins-bot:

[mediawiki/extensions/Kartographer@master] Remove icons from nearby and external maps buttons

https://gerrit.wikimedia.org/r/835163

awight set the point value for this task to 0.Sep 29 2022, 1:30 PM

Change 843467 had a related patch set uploaded (by Awight; author: Awight):

[mediawiki/extensions/Kartographer@master] Feature flag to disable Wikivoyage Nearby

https://gerrit.wikimedia.org/r/843467

Change 843467 merged by jenkins-bot:

[mediawiki/extensions/Kartographer@master] Feature flag to disable Wikivoyage Nearby

https://gerrit.wikimedia.org/r/843467

One more use case to consider, is when no nearby markers are found in the search area (or the API request fails for some reason). Then the button feels a bit broken, maybe we should show an indicator saying something like "No nearby articles found in this area"?

Change 887940 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[mediawiki/extensions/Kartographer@master] Nearby: Adjust article limit and cluster radius

https://gerrit.wikimedia.org/r/887940

Change 887940 merged by jenkins-bot:

[mediawiki/extensions/Kartographer@master] Nearby: Adjust article limit and cluster radius

https://gerrit.wikimedia.org/r/887940

Change 889558 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/Kartographer@master] Nearby: Make number of nearby points a configuration

https://gerrit.wikimedia.org/r/889558

Change 889558 merged by jenkins-bot:

[mediawiki/extensions/Kartographer@master] Nearby: Make number of nearby points a configuration

https://gerrit.wikimedia.org/r/889558