Add prehistoric assets
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user