[TASK] Context menu/right click open layermenu
This commit is contained in:
parent
5e93a5da68
commit
b27ae7e8da
@ -285,8 +285,8 @@ define(["map/clientlayer", "map/labelslayer",
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function contextMenuGotoLocation(e) {
|
function contextMenuOpenLayerMenu() {
|
||||||
router.gotoLocation(e.latlng);
|
document.querySelector('.leaflet-control-layers').classList.add('leaflet-control-layers-expanded');
|
||||||
}
|
}
|
||||||
|
|
||||||
var el = document.createElement("div");
|
var el = document.createElement("div");
|
||||||
@ -310,7 +310,7 @@ define(["map/clientlayer", "map/labelslayer",
|
|||||||
map.on("locationfound", locationFound);
|
map.on("locationfound", locationFound);
|
||||||
map.on("locationerror", locationError);
|
map.on("locationerror", locationError);
|
||||||
map.on("dragend", saveView);
|
map.on("dragend", saveView);
|
||||||
map.on("contextmenu", contextMenuGotoLocation);
|
map.on("contextmenu", contextMenuOpenLayerMenu);
|
||||||
|
|
||||||
addButton(locateUserButton);
|
addButton(locateUserButton);
|
||||||
addButton(showCoordsPickerButton);
|
addButton(showCoordsPickerButton);
|
||||||
|
Loading…
Reference in New Issue
Block a user