diff --git a/popup-click.js b/popup-click.js index f1117f8..266c448 100644 --- a/popup-click.js +++ b/popup-click.js @@ -20,10 +20,18 @@ } }); }); - var markerContextMenu = { - contextmenu: true, - }; - mkr = L.marker(e.latlng, {draggable: true},markerContextMenu).addTo(map); +  var markerContextMenu = { + contextmenu: true, + contextmenuItems: [{ + text: '詳細を表示', + index: 0, + callback: showMarkerInfo + }, { + separator: true, + index: 1 + }] + } + L.marker([38.891, 139.824], markerContextMenu).addTo(map);     mkr.on("contextmenu", (e) => {   e.target.bindPopup(pop);