From cd77240401a3eab13561ba6d34bd2aa89a5a0e5d Mon Sep 17 00:00:00 2001 From: Pyro Nicampt <81565698+PyroNicampt@users.noreply.github.com> Date: Sat, 28 Dec 2024 22:12:02 -0600 Subject: [PATCH] Add POI to layer toggles --- index.js | 2 +- legend.js | 26 ++++++++++++++++++++++++++ style.css | 2 +- 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index e64c00e..c92cd3b 100644 --- a/index.js +++ b/index.js @@ -557,7 +557,7 @@ function addPoi(poi, level = 0){ poiIcon.setAttribute('href', '#mrk_landmark'); poiDisplay.setAttribute('fill', '#af5757'); poiTooltip.innerHTML = poi.name ?? 'Unknown Landmark'; - poiLayers.service.prepend(poiElement); + poiLayers.landmarks.prepend(poiElement); poiElement.classList.add('minZoomCull_1'); break; case 'shop': diff --git a/legend.js b/legend.js index fd43b4a..de2a562 100644 --- a/legend.js +++ b/legend.js @@ -30,6 +30,32 @@ let settingEntries = [ } ], }, + { + label: 'Points of Interest', + id: 'toggle_poi', + state: true, + func: state => { + document.getElementById('poi_container').style.display = state ? 'unset' : 'none'; + }, + children: [ + { + label: 'Services', + id: 'toggle_services', + state: true, + func: state =>{ + document.getElementById('poi_service').style.display = state ? 'unset' : 'none'; + }, + }, + { + label: 'Landmarks', + id: 'toggle_landmarks', + state: true, + func: state =>{ + document.getElementById('poi_landmarks').style.display = state ? 'unset' : 'none'; + }, + }, + ] + }, { label: 'Track Color', id: 'radio_trackColor', diff --git a/style.css b/style.css index cde804e..9d570e0 100644 --- a/style.css +++ b/style.css @@ -81,7 +81,7 @@ a:visited{ font-size: 15px; display: flex; flex-flow: column wrap; - max-height: 350px; + max-height: 310px; } #footer{