Page MenuHomePhabricator

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


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