Open modal for internal links (WIP)

This commit is contained in:
2025-10-29 18:23:34 +01:00
parent 262540e735
commit 13550078cb
3 changed files with 39 additions and 6 deletions

View File

@@ -200,6 +200,7 @@ GIS.sites = async function () {
// Populate app state for reuse and avoid window.Sites etc.
// Municipality (Capri, Anacapri) added for reuse in dynamic menu
marker.options.municipality = record.municipality;
marker.options.data = record;
const markerIndex = `${record.coordinates[0]} ${record.coordinates[1]}`;
GisState.markers.sites[markerIndex] = marker;
}
@@ -230,6 +231,7 @@ GIS.notConserved = async function () {
// Populate app state for reuse and avoid window.Sites etc.
const markerLabel = `${record.coordinates[0]} ${record.coordinates[1]}`;
marker.options.municipality = record.municipality;
marker.options.data = record;
GisState.markers.notConserved[markerLabel] = marker;
}
@@ -262,6 +264,7 @@ GIS.findings = async function () {
findings.addLayer(marker);
const markerLabel = `${record.coordinates[0]} ${record.coordinates[1]}`;
marker.options.municipality = record.municipality;
marker.options.data = record;
GisState.markers.findings[markerLabel] = marker;
}
@@ -293,6 +296,7 @@ GIS.prehistoric = async function () {
const markerLabel = `${record.coordinates[0]} ${record.coordinates[1]}`;
marker.options.municipality = record.municipality;
marker.options.data = record;
GisState.markers.prehistoric[markerLabel] = marker;
prehistoric.addLayer(marker);
@@ -323,6 +327,7 @@ GIS.underwater = async function () {
);
const markerLabel = `${record.coordinates[0]} ${record.coordinates[1]}`;
marker.options.data = record;
GisState.markers.underwater[markerLabel] = marker;
underwater.addLayer(marker);
@@ -355,6 +360,7 @@ GIS.reuse = async function () {
const markerLabel = `${record.coordinates[0]} ${record.coordinates[1]}`;
marker.options.municipality = record.municipality;
marker.options.label = record.label;
marker.options.data = record;
GisState.markers.reuse[markerLabel] = marker;
reuse.addLayer(marker);