diff --git a/public/index.js b/public/index.js index f6b5a74..a80de0c 100644 --- a/public/index.js +++ b/public/index.js @@ -41,6 +41,8 @@ map.on('click', onMapClick); let markers = {}; let categories = {}; fetch('/marker.json').then(response => response.json()).then(marker_data => { + const params = new URLSearchParams(document.location.search); + let default_place = params.get('place'); for(let category_name in marker_data) { const category_data = marker_data[category_name]; @@ -49,8 +51,16 @@ fetch('/marker.json').then(response => response.json()).then(marker_data => { category_data.places.forEach(marker_info => { const marker = L.marker( [marker_info.lat, marker_info.lon], - {title: marker_info.name, icon: icon}).bindPopup(`