Cluster options + images
This commit is contained in:
BIN
webgis/img/DJI_0364.JPG
Normal file
BIN
webgis/img/DJI_0364.JPG
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 741 KiB |
BIN
webgis/img/TORRE DAMECUTA 3.jpg
Normal file
BIN
webgis/img/TORRE DAMECUTA 3.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 440 KiB |
BIN
webgis/img/VILLA DAMECUTA 2.jpg
Normal file
BIN
webgis/img/VILLA DAMECUTA 2.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 MiB |
BIN
webgis/img/VILLA DAMECUTA.jpg
Normal file
BIN
webgis/img/VILLA DAMECUTA.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 MiB |
@@ -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": {
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user