WMDE Technical Wishes/Geoinformation/Nearby articles
Within the topic “Better support for Geoinformation” the Technical Wishes team aimed to implement some improvements to Kartographer. To find out what kind of improvements are desired, a survey on international wikis using Kartographer and the German-speaking community was conducted in March 2022. The most popular request was the display of nearby articles on a map, next to the use of QIDs from Wikidata to add a marker to a map. The detailed results of the survey are published here. This feature was also requested in this year's Community Wishlist Survey 2022 run by the Wikimedia Foundation, where it also found numerous supporters.
This additional feature makes it possible to display geographically close articles on a Kartographer map. It offers an additional way of reading Wikipedia, where articles are geographically related to each other and may be explored as such.
- Deploy the feature to pilot wikis
- March 2023: deploy clusters for nearby articles and a "reload results" button to the wikis above
- March 2023: "show nearby articles" works in mobile view
- Deploy the feature to more wikis
- April 11, 2023: all remaining wikis which are not using the Wikivoyage feature "Explore nearby destinations"
- May 24, 2023: replace the Wikivoyage feature "Explore nearby destinations" to reduce the amount of code to be maintained, and a similar user experience across all wikis
How it works
In full-screen mode, each Kartographer map has a button labelled “Show nearby articles” at the bottom of the map. It can be used to show up to 300 geographically close articles. The nearby articles are generated from the wiki the reader is currently at.
Nearby articles are displayed on the map as gray circles. This way, they are clearly distinguishable from the markers that have been manually added by the creator of the map. Both kinds of markers are shown on the map at the same time.
Clicking on the marker of a nearby article opens a pop-up containing the title, a brief description and an image of the article. Clicking on the title will take you from the map view to the article itself. If the article is linked to an entry on Wikidata, the pop-up displays a brief description from Wikidata. The image originates from the article itself and is provided by the MediaWiki extension PageImages, which also powers the images for the page preview pop-ups.
Multiple pins at the same location are clustered into groups when zooming out and unclustered when zooming in. A "reload results" button appears when you zoom in or out, or when you move on the map.
The search for the nearby articles is performed by CirrusSearch, combined with the "nearcoord:" search feature of the GeoData extension. While CirrusSearch prioritizes the articles according to their relevance, "nearcoord:" determines articles whose coordinates lie within the specified surrounding search radius. The coordinates of articles are defined with the help of the GeoData extension. This way, the top 300 relevant nearby articles are found and are given a marker on the map.
In Kartographer maps on Wikivoyage, there was already a similar feature displaying nearby articles. This feature and the one developed by the Technical Wishes Team did exist in parallel for testing purposes.
Comparison of the Wikivoyage feature and the new feature
“Explore nearby destinations”
“Show nearby articles”
|What it looks like||
Nearby articles are displayed as gray pin markers.
When you click on it, you see:
Nearby articles are displayed as gray circles.
When you click on it, you see:
||on all wikis using Kartographer|
|How the nearby articles are defined||There is one list per wiki that includes all destinations. This list needs to be updated manually.
Updates of that list rely on other structures on the wiki, e.g., certain templates.
|Nearby articles are defined automatically, from all articles of the wiki.
CirrusSearch is used to prioritize the articles according to their relevance. The search feature "nearcoord:" from the GeoData extension determines articles whose coordinates lie within the specified surrounding search radius.
|How to turn it on||with the icon underneath the zoom controls||with a button labelled “show nearby articles” at the bottom|
|What happens when the nearby mode is activated?||
|Works on the embedded map in the article page||✅ yes||⛔ no, the feature only works on full size maps
(For performance reasons, it's only possible to interact with embedded maps on Wikivoyage.)
|Works on mobile||✅ yes||✅ yes|
At first glance, the new feature is somewhat resembling the Special:Nearby page, which displays articles that are geographically close to the reader's location. Here, too, the wish was repeatedly expressed that the articles should be displayed on a map instead of in a linear list. Since the special page and the new feature are different MediaWiki features, the new functionality of “Show nearby articles” in Kartographer generated maps cannot simply be transferred to the special page.
- On Phabricator: T304076
Comments, questions, and suggestions about this feature are welcome on the discussion page!