Page MenuHomePhabricator

<mapframe>: title attribute of map shapes are not shown as tooltip
Open, LowPublic

Description

It is possible to add external data to a Kartographer map. Sources of these external data are OpenStreetMap via Wikidata Id or a from Wikimedia Commons. But in contrast to map markers no tooltip information is shown for these geo objects.

See for instance: https://de.wikivoyage.org/wiki/Wernigerode. On the map you will see a train track in blue color named Harzquerbahn and several map markers. If you move the mouse onto a marker a tooltip is shown but not if you move the mouse onto the geoline object.

The geoline object is described in the wgKartographerLiveData JavaScript variable.

[{"type":"ExternalData","service":"geoline","url":"https://maps.wikimedia.org/geoline?getgeojson=1\u0026ids=Q520404","properties":{"fill":"#555555","fill-opacity":0.5,"stroke":"#0000C0","stroke-opacity":0.5,"stroke-width":4,"title":"Harzquerbahn"}}]

Please note the title value.

For this geoline object the following HTML code is created:

<div class="leaflet-pane leaflet-overlay-pane">
  <svg pointer-events="none" class="leaflet-zoom-animated" width="358" height="358" style="transform: translate3d(-105px, -52px, 0px);" viewBox="-105 -52 358 358">
    <g>
      <path class="leaflet-interactive" stroke="#0000C0" stroke-opacity="0.5" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" fill="none" d="M-69 306L13 224L5 174L18 38L38 25L137 7L200 -47"></path>
    </g>
  </svg>
</div>

If you add a title attribute title="Harzquerbahn" to the leading div or the following svg tag then the tooltip information would be shown.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 17 2018, 5:26 AM
Mholloway triaged this task as Low priority.Aug 14 2018, 3:56 PM
Mholloway edited projects, added Maps (Kartographer); removed Maps.