Jump to content

Talk:WMDE Technical Wishes/Geoinformation/Geopoints via QID

Add topic
From Meta, a Wikimedia project coordination wiki

Adding Pop-Up Label

[edit]
Map
Rute Pengumpan Dalam Kota (Transjakarta) : Rute 1B (Stasiun Palmerah - Tosari)

How do I add pop-up label by using QID? Normally, i use GeoJSON : "properties":{"title":"Pop Up Text"} Example (click the marker to show pop-up label) : Rtnf (talk) 16:24, 5 October 2022 (UTC)Reply

Unfortunately this is only partially possible. When done like this all popups show the same text:
<mapframe width="350" height="350">
{
    "type": "ExternalData",
    "service": "geopoint",
    "ids": "Q12516311, Q19944435",
    "properties": {
        "title": "…",
        "description": "…",
    }
}
</mapframe>
I think the two options you have are:
  1. Generate and copy the GeoJSON, as you already did in your example.
  2. Write a SPARQL query that can do this in realtime, as described in mw:Help:Extension:Kartographer#Via Wikidata query.
I hope this helps. --Thiemo Kreuz (WMDE) (talk) 13:55, 14 October 2022 (UTC)Reply
@Thiemo Kreuz (WMDE) Yeah, but when you do that via query, you don't get pop-ups, do you? You only get a preview fullpage...Like in cs:Seznam_ledovcových_jezer_v_Česku, no? Or is there a more elegant way? Vojtěch Dostál (talk) 12:40, 13 December 2023 (UTC)Reply
I'm not sure what you miss. On most projects the small maps are not interactive. This is for performance reasons. But when I open it full screen there are popups. Thiemo Kreuz (WMDE) (talk) 13:07, 13 December 2023 (UTC)Reply

Use for poly-line

[edit]

Hi. I would like to use mapframe for paths. For example This OSM relation www.openstreetmap.org/relation/404914, which has this wikidata www.wikidata.org/wiki/Q123376517. Please note entry "OpenStreetMap relation ID" there. It would be great if <mapframe> would somehow draw the whole path and not just a point.

This feature would be useful not just for hikes, but also for highways, roads and other path objects. Dfsdfaf456 (talk) 13:04, 13 December 2023 (UTC)Reply

+1 for this. -- Zache (talk) 11:58, 11 January 2024 (UTC)Reply

Document the feature in other projects/languages

[edit]

I believe that a good step towards spreading this feature is to document it on the projects where it might be used (mostly Wikipedia and Wikitravel, I assume, but perhaps other wikis too). For example, the page WMDE Technical Wishes/Geoinformation/Geopoints via QID is currently available in only one other language (German). Automatik (talk) 00:53, 14 December 2023 (UTC)Reply