Page MenuHomePhabricator

Adding a close control property to Kartographer.Box.MapClass
Open, LowPublicFeature

Description

With the JavaScript class Kartographer.Box.MapClass you can dynamically create maps. It is possible to specify if a Scale or OpenFullScreen control is needed. But impossible to add a Close control. Nearby and Layers controls are added by Kartographer.js ( hooking wikipage.maps ).

mapclass-map-control.jpg (1×1 px, 558 KB)

At the German Wikivoyage you can use the globe indicator to add a map on demand.

mapclass-close-control.jpg (1×1 px, 498 KB)

The Close control cannot be added by a Kartographer.Box.MapClass property. We are using a client JavaScript https://de.wikivoyage.org/wiki/MediaWiki:MapTools.js to add a control using the jQuery library. We need the Close control to remove the map.

Event Timeline

I think it makes sense to add also a zoom-level control property; not only in edit mode. See for instance https://github.com/azavea/Leaflet.zoomdisplay , http://azavea.github.io/Leaflet.zoomdisplay/ and T140210. This control should be presented on all maps by default.

Mholloway edited projects, added Maps (Kartographer); removed Maps.

or just create your own leaflet control like that class did. The close icon class is part of the style module oojs-ui.styles.icons-interactions

Aklapper changed the subtype of this task from "Task" to "Feature Request".Nov 15 2023, 5:19 PM