maps: add possibility to have a map without geolocation button (#24571)
This commit is contained in:
parent
1e529e134d
commit
16f84f464c
|
@ -104,7 +104,7 @@ $(function() {
|
|||
if (map_options.maxZoom != map_options.minZoom) {
|
||||
new L.Control.Zoom({position: map_controls_position}).addTo(map);
|
||||
}
|
||||
if (L.Control.Gps) {
|
||||
if (L.Control.Gps && $map_widget.data('include-geoloc-button')) {
|
||||
var gps_control = new L.Control.Gps({position: map_controls_position});
|
||||
map.addControl(gps_control);
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
data-max-zoom="{{ max_zoom }}" data-init-lat="{{ init_lat }}"
|
||||
data-init-lng="{{ init_lng }}" data-geojson-url="{{ geojson_url }}"
|
||||
data-tile-urltemplate="{{ tile_urltemplate}}" data-map-attribution="{{ map_attribution}}"
|
||||
data-include-geoloc-button="true"
|
||||
{% if group_markers %}data-group-markers="1"{% endif %}
|
||||
{% if max_bounds.corner1.lat %}
|
||||
data-max-bounds-lat1="{{ max_bounds.corner1.lat }}"
|
||||
|
|
Loading…
Reference in New Issue