mirror of
https://github.com/itsdave-de/fusionpbx_connect.git
synced 2025-05-07 08:05:30 +02:00
start markpoints without add on map (turn off default)
This commit is contained in:
parent
6d533c91b4
commit
31c43a6914
@ -44,7 +44,7 @@ function init_map(frm) {
|
|||||||
currentMap = map;
|
currentMap = map;
|
||||||
|
|
||||||
// Create a layer group for checkpoint markers
|
// Create a layer group for checkpoint markers
|
||||||
var checkpointMarkers = window.L.layerGroup().addTo(map);
|
var checkpointMarkers = window.L.layerGroup();
|
||||||
|
|
||||||
// Control to toggle checkpoint markers
|
// Control to toggle checkpoint markers
|
||||||
var control = window.L.control({ position: 'topleft' });
|
var control = window.L.control({ position: 'topleft' });
|
||||||
@ -55,12 +55,12 @@ function init_map(frm) {
|
|||||||
button.href = '#';
|
button.href = '#';
|
||||||
|
|
||||||
window.L.DomEvent.on(button, 'click', function (e) {
|
window.L.DomEvent.on(button, 'click', function (e) {
|
||||||
window.L.DomEvent.stop(e); // Alterado para parar totalmente o evento
|
window.L.DomEvent.stop(e);
|
||||||
|
|
||||||
if (map.hasLayer(checkpointMarkers)) {
|
if (map.hasLayer(checkpointMarkers)) {
|
||||||
map.removeLayer(checkpointMarkers); // Desligar
|
map.removeLayer(checkpointMarkers); // turn off
|
||||||
} else {
|
} else {
|
||||||
map.addLayer(checkpointMarkers); // Ligar
|
map.addLayer(checkpointMarkers); // turn on
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user