Add prehistoric assets

This commit is contained in:
2025-01-10 11:29:37 +01:00
parent 058c83da65
commit 73e804f303
5 changed files with 215 additions and 3 deletions

View File

@@ -257,6 +257,27 @@ GIS.findings = async function () {
*
*/
GIS.prehistoric = async function () {
let data = await fetch(`${API_URL}/prehistoric`)
.then(data => data.json());
let prehistoric = L.markerClusterGroup(
clusterOptions
);
for (let record of data.records) {
prehistoric.addLayer(L.marker(
record.coordinates,
{icon: Icons.prehistoric}
).bindTooltip(record.denomination)
.on(
'click',
() => UI.openPrehistModal(record, '#prehist-data')
)
);
}
return prehistoric;
/*
const geo = await fetch(`${BASE_URL}/geojson/preistorici.geojson`)
.then(res => res.json());
@@ -281,6 +302,7 @@ GIS.prehistoric = async function () {
});
return prehistoric;
*/
}
/*
GIS._prepareLayers = async function(layer) {