Cluster options + images

This commit is contained in:
2024-11-30 12:01:15 +01:00
parent 07f8dd9a86
commit 165806ae05
10 changed files with 17 additions and 17 deletions

BIN
webgis/img/DJI_0364.JPG Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 741 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 440 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

View File

@@ -9,6 +9,7 @@
<link rel="stylesheet" href="js/vendor/spotlight.js/dist/css/spotlight.min.css" />
<link rel="stylesheet" href="js/vendor/@kalisio/leaflet-graphicscale/dist/Leaflet.GraphicScale.min.css" />
<link rel="stylesheet" href="js/vendor/@photo-sphere-viewer/core/index.css" />
<link rel="shortcut icon" type="image/png" href="/img/favicon.png">
<script type="importmap">
{
"imports": {

View File

@@ -60,7 +60,6 @@ const optionsFabbricati = {
fillColor: '#5b5d5f',
fillOpacity: 0.8
};
const MARKER_NAMES = {
sites: {
'gradola' : 'Villa di Gradola',
@@ -75,6 +74,11 @@ const MARKER_NAMES = {
'lopozzo' : 'Località Lo Pozzo',
},
};
const clusterOptions = {
spiderfyOnMaxZoom: false,
showCoverageOnHover: false,
disableClusteringAtZoom: 19,
};
/**
* Capitalize a text string
@@ -159,10 +163,9 @@ GIS.initMap = async function (mapId, zoomLevel = this.INIT_ZOOM) {
* @returns {L.markerClusterGroup}
*/
GIS.sitesMarkers = async function (sitesGroup) {
let sitesMarkers = L.markerClusterGroup({
showCoverageOnHover: false,
disableClusteringAtZoom: 19,
});
let sitesMarkers = L.markerClusterGroup(
clusterOptions
);
for (let id in MARKER_NAMES.sites) {
let layer = sitesGroup.customGetLayer(id);
@@ -203,10 +206,9 @@ GIS.notConserved = async function () {
let notConserData = await fetch(`${API_URL}/not_conserved`)
.then(data => data.json());
let notConserved = L.markerClusterGroup({
showCoverageOnHover: false,
disableClusteringAtZoom: 19,
});
let notConserved = L.markerClusterGroup(
clusterOptions
);
for (let record of notConserData.records) {
notConserved.addLayer(L.marker(
@@ -230,10 +232,9 @@ GIS.findings = async function () {
let findingsData = await fetch(`${API_URL}/finding`)
.then(data => data.json());
let findings = L.markerClusterGroup({
showCoverageOnHover: false,
disableClusteringAtZoom: 19,
});
let findings = L.markerClusterGroup(
clusterOptions
);
for (let record of findingsData) {
findings.addLayer(L.marker(