misc: allow map controls position to be overridded by the theme (#19032)
This commit is contained in:
parent
2dbe3f8ac1
commit
b7be6a9aa5
|
@ -16,11 +16,14 @@ $(window).on('load', function() {
|
|||
}
|
||||
var min_zoom = parseInt($map_widget.data('min_zoom'));
|
||||
if (! isNaN(min_zoom)) map_options.minZoom = min_zoom;
|
||||
map_options.zoomControl = false;
|
||||
var map_tile_urltemplate = $map_widget.data('tile-urltemplate');
|
||||
var map_attribution = $map_widget.data('map-attribution');
|
||||
var map = L.map($(this).attr('id'), map_options);
|
||||
var map_controls_position = $('body').data('map-controls-position') || 'topleft';
|
||||
new L.Control.Zoom({position: map_controls_position}).addTo(map);
|
||||
$map_widget[0].leaflet_map = map;
|
||||
var gps_control = new L.Control.Gps();
|
||||
var gps_control = new L.Control.Gps({position: map_controls_position});
|
||||
map.addControl(gps_control);
|
||||
var hidden = $(this).prev();
|
||||
map.marker = null;
|
||||
|
|
Loading…
Reference in New Issue