diff --git a/lib/map.js b/lib/map.js index 6835fa8..90b020f 100644 --- a/lib/map.js +++ b/lib/map.js @@ -285,8 +285,8 @@ define(["map/clientlayer", "map/labelslayer", } } - function contextMenuGotoLocation(e) { - router.gotoLocation(e.latlng); + function contextMenuOpenLayerMenu() { + document.querySelector('.leaflet-control-layers').classList.add('leaflet-control-layers-expanded'); } var el = document.createElement("div"); @@ -310,7 +310,7 @@ define(["map/clientlayer", "map/labelslayer", map.on("locationfound", locationFound); map.on("locationerror", locationError); map.on("dragend", saveView); - map.on("contextmenu", contextMenuGotoLocation); + map.on("contextmenu", contextMenuOpenLayerMenu); addButton(locateUserButton); addButton(showCoordsPickerButton);