Add missing layers
This commit is contained in:
parent
69442ce7f7
commit
d95ca7206d
15
js/gis.js
15
js/gis.js
@ -101,6 +101,10 @@ GIS.initMap = async function (mapId, zoomLevel = this.INIT_ZOOM) {
|
|||||||
|
|
||||||
const {baseMap, sitesGroup} = await this.initLayers(map);
|
const {baseMap, sitesGroup} = await this.initLayers(map);
|
||||||
|
|
||||||
|
let layerVincoli = await this.loadLayer('vincoli.geojson', optionsVincoli);
|
||||||
|
// TODO named parameters??
|
||||||
|
let layerPaesistici = await this.loadLayer('paesistici.geojson', optionsPaesistici);
|
||||||
|
|
||||||
// Add scale and ruler controls
|
// Add scale and ruler controls
|
||||||
L.control.scale({imperial: false}).addTo(map);
|
L.control.scale({imperial: false}).addTo(map);
|
||||||
L.control.graphicScale({fill: 'hollow', position: 'bottomright'}).addTo(map);
|
L.control.graphicScale({fill: 'hollow', position: 'bottomright'}).addTo(map);
|
||||||
@ -109,9 +113,9 @@ GIS.initMap = async function (mapId, zoomLevel = this.INIT_ZOOM) {
|
|||||||
let siteIcon = L.icon(
|
let siteIcon = L.icon(
|
||||||
{
|
{
|
||||||
iconUrl: 'img/icons/siti.png',
|
iconUrl: 'img/icons/siti.png',
|
||||||
iconSize: [38, 58],
|
iconSize: [24, 36],
|
||||||
iconAnchor: [22, 57],
|
iconAnchor: [12, 32],
|
||||||
tooltipAnchor: [0, -46],
|
tooltipAnchor: [0, -26],
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -148,6 +152,8 @@ GIS.initMap = async function (mapId, zoomLevel = this.INIT_ZOOM) {
|
|||||||
const archeo = {
|
const archeo = {
|
||||||
'Beni archeologici (punti)' : markersGroup,
|
'Beni archeologici (punti)' : markersGroup,
|
||||||
'Beni archeologici (strutture)' : sitesGroup,
|
'Beni archeologici (strutture)' : sitesGroup,
|
||||||
|
'Vincoli archeologici' : layerVincoli,
|
||||||
|
'Vincoli paesistici' : layerPaesistici,
|
||||||
};
|
};
|
||||||
|
|
||||||
markersGroup.addTo(map);
|
markersGroup.addTo(map);
|
||||||
@ -225,9 +231,6 @@ GIS.initLayers = async function(map) {
|
|||||||
layerDamecuta.id = 'damecuta';
|
layerDamecuta.id = 'damecuta';
|
||||||
layerTiberio.id = 'tiberio';
|
layerTiberio.id = 'tiberio';
|
||||||
|
|
||||||
let layerVincoli = await this.loadLayer('vincoli.geojson', optionsVincoli);
|
|
||||||
// TODO named parameters??
|
|
||||||
let layerPaesistici = await this.loadLayer('paesistici.geojson', optionsPaesistici);
|
|
||||||
let osmap = new L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
let osmap = new L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||||
maxNativeZoom : 22,
|
maxNativeZoom : 22,
|
||||||
maxZoom: 22,
|
maxZoom: 22,
|
||||||
|
Loading…
Reference in New Issue
Block a user