Requirements
- Auto-generate title and description for markers added by QID, so that the standard Kartographer pop-up appears when clicked on in dynamic maps
- Title: [Wikidata item label]
- If an article exists on the same wiki as where the map is shown, make the title a link to the article page.
- Description: [if existing in language, use wikidata item description. if existing, use wikidata image]
- On hover, tooltip should show the title (same as current behavior for pop-ups)
- Language: Use default language of the wiki
- Enable overwriting the auto-generated popups with manually entered user data
Note: similar to what we did here T304078
Mock
Note: use current default styling. Any styling updates would be made in follow-up tickets.
Technical implementation
There is already this feature that displays title, link, description and image for query input, when all the needed data is defined in the query. This is already working for geopoints as well. But this requires the user to know the correct wording for the parameters and query them manually.
We can make an automated query for the needed data that would be created when a user enters an ids for (both geoshapes and) geopoints (POC). We can do this automatically or make this a setting the user can define, e.g. autofill: true or similar. Or the user could define data that should be displayed (see example below).
<mapframe text="Geopoint with QID as input" width="400" height="300" align="left"> { "type": "ExternalData", "service": "geopoint", "autofill": ["title", "description", "link", "image"], "ids": "Q1431922" } </mapframe>
Open questions
- Data source: sparql vs. wikidata api, see also T302291
POC (to review)
Query in wikidata query service
Next steps
- Make this work for all geo elements (geoshapes and geolines)
Optional next steps (in case of user feedback)
- Add a setting for opt-out or let user choose which elements should be displayed