Show zones in campground map by default if requested by query parameters

This is to be able to link from the booking form, with a link under the
area preferences, and show the zones layer, that is what customers most
certainly want to see at that point.
This commit is contained in:
jordi fita mas 2024-02-04 03:43:00 +01:00
parent 2a5b6df8cf
commit ebcc2a017f
1 changed files with 5 additions and 0 deletions

View File

@ -205,4 +205,9 @@
.addOverlay(zonesOverlay, zones.getAttribute('aria-label'))
.addTo(map)
;
const params = new URLSearchParams(window.location.search);
if (params.has('zones')) {
map.addLayer(zonesOverlay);
}
})();