Page MenuHomePhabricator

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


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: 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.


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">
      <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>

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.
TheDJ added a subscriber: TheDJ.Mar 12 2020, 12:28 AM

If you move the mouse onto a marker a tooltip is shown but not if you move the mouse onto the geoline object.

works for me ?

Restricted Application added a subscriber: Liuxinyu970226. · View Herald TranscriptMar 12 2020, 12:28 AM

For me, a tooltip is the information on a yellow background which is based on the tags title attribute and shown on mouseover event. I do not think about the pop-up window (with title and image) which is opened by a mouse click.

TheDJ changed the task status from Open to Stalled.Mar 12 2020, 9:38 AM
TheDJ added a project: Upstream.

Checked. This is in Leaflet Marker functionality. The GeoJSON features using Polyline and Polygon do indeed not support this.