diff --git a/map/Appn/markerlayer.js b/map/Appn/markerlayer.js index d109146..3880dc2 100644 --- a/map/Appn/markerlayer.js +++ b/map/Appn/markerlayer.js @@ -1,10 +1,10 @@ document.addEventListener("DOMContentLoaded", () => { - + var mymap = L.map("mymap").setView([38.891, 139.824], 16); L.tileLayer('//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { attribution: '© OpenStreetMap \ contributors' - }).addTo(markerlayer); + }).addTo(mymap); function distance(x1, y1, x2, y2) { // ヒュベニ式による距離概算 rx = 6378137; // 赤道半径(m) WGS84 ry = 6356752.314; // 極半径(m) WGS84 @@ -43,6 +43,4 @@ } } mymap.on('click', startOrGoal); - var mlmap = L.map("markerlayer").setView([38.891, 139.824], 16); - }, false); // HTML文書がロードされたら上のアロー関数を呼ばせる