(function () {
var container = document.getElementById('popup2');
var content = document.getElementById('popup-content');
var closer = document.getElementById('popup-closer');
var overlay = new ol.Overlay({
element: container,
autoPan: true,
autoPanAnimation: {
duration: 250,
},
});
closer.onclick = function () {
overlay.setPosition(undefined);
closer.blur();
return false;
};
// PUNTI start ************************************************************************************
var style = [];
var vectorList_20 = [];
var iconList = [];
style['673'] = {
'Point': new ol.style.Style({
image: new ol.style.Circle({
fill: new ol.style.Fill({
color: 'rgba(255,255,0,0.6)',
}),
radius: 10,
stroke: new ol.style.Stroke({
color: '#ff0',
width: 1,
}),
}),
}),
'LineString': new ol.style.Style({
stroke: new ol.style.Stroke({
color: '#914f15',
width: 3,
}),
}),
'MultiLineString': new ol.style.Style({
stroke: new ol.style.Stroke({
color: '#914f15',
width: 3,
}),
}),
};
// GPX start
var t = new ol.Feature({
geometry: new ol.geom.Point(ol.proj.fromLonLat([10.590972039361224, 45.67376762402138])),
name: 'Bivouac “Due Aceri”',
description: 'The bivouac “Due Aceri” is placed on the southern slope of Mount Pizzocolo (m. 1581), right unter the peak, from where you can enjoy a beatiful panoramic 360° view of the Alpine arc, the Lake Garda, the Lake Valvestino and of the valleys below. A little further up the lodge, there is a small chapel, always open (every 3rd Sunday of June, at 11 a.m.,it is celebrated the Mass). On the top of the mountain there is a cross and some beams pointing towards diffrent mountains. The bivouac, built on the ruins of a military building dating back to the WWI, counts with 1 room with a fireplace, 2 tables with benches and a first aid kit. A ladder takes to a loft. There are no beds nor blankets.'
});
t.setStyle(
new ol.style.Style({
image: new ol.style.Circle({
fill: new ol.style.Fill({
color: '#914f15'
}),
radius: 8,
stroke: new ol.style.Stroke({
color: '#000000',
width: 1,
}),
}),
}),
);
iconList.push(t);
var iconLayer = new ol.layer.Vector({
source: new ol.source.Vector({
features: iconList,
}),
});
vectorList_20.push(iconLayer);
var vectorList_19 = [];
var iconList = [];
style['669'] = {
'Point': new ol.style.Style({
image: new ol.style.Circle({
fill: new ol.style.Fill({
color: 'rgba(255,255,0,0.6)',
}),
radius: 10,
stroke: new ol.style.Stroke({
color: '#ff0',
width: 1,
}),
}),
}),
'LineString': new ol.style.Style({
stroke: new ol.style.Stroke({
color: '#159181',
width: 3,
}),
}),
'MultiLineString': new ol.style.Style({
stroke: new ol.style.Stroke({
color: '#159181',
width: 3,
}),
}),
};
// GPX start
var t = new ol.Feature({
geometry: new ol.geom.Point(ol.proj.fromLonLat([10.560180804632, 45.697801215542])),
name: 'Campèi de Sima',
description: '
This lodge is in Campiglio di Cima (Campèi de Sìma), a small locality in Toscolano Maderno, in the Alto Garda Bresciano Natuaral Park, at an altitude of 1.017 m. More than a lodge, it is an actual alpine burg, formed by 3 buildings and a small church named after Madonna della Neve (St. Mary of the Snows). The restoration ended in 2000, thanks to ERSAF (owner of the buildings) and A.N.A., that made the mountain cottages of Campiglio di Cima enjoyable.'
});
t.setStyle(
new ol.style.Style({
image: new ol.style.Circle({
fill: new ol.style.Fill({
color: '#159181'
}),
radius: 8,
stroke: new ol.style.Stroke({
color: '#000000',
width: 1,
}),
}),
}),
);
iconList.push(t);
style['671'] = {
'Point': new ol.style.Style({
image: new ol.style.Circle({
fill: new ol.style.Fill({
color: 'rgba(255,255,0,0.6)',
}),
radius: 10,
stroke: new ol.style.Stroke({
color: '#ff0',
width: 1,
}),
}),
}),
'LineString': new ol.style.Style({
stroke: new ol.style.Stroke({
color: '#159181',
width: 3,
}),
}),
'MultiLineString': new ol.style.Style({
stroke: new ol.style.Stroke({
color: '#159181',
width: 3,
}),
}),
};
// GPX start
var t = new ol.Feature({
geometry: new ol.geom.Point(ol.proj.fromLonLat([10.556957635784, 45.678020597491])),
name: 'Rifugio \"Pirlo\" allo Spino',
description: '
This lodge, property of the CAI of Salò, is open daily from spring to autumn and on the weekends during the rest of the year. It’s a starting point for interesting hikes to the Pizzocolo (1h30m) and to Mount Spino (less than 1h), and for those who wants to try the close vie ferrate. Hospitality, good food and perfect accommodation for families, hikers and mountain bike lovers. The lodge is located at a height of 1165m at the foot of Mount Spino and Pizzocolo.
It has 2 big bedrooms for groups (40 beds) with bathroom. It is possible to use the main room for group meetings
Easy to reach from Toscolano Maderno, the lodge (mt . 1185) was built on a station of the Finance Police and named after Giorgio Pirlo, who died during WW II
'
});
t.setStyle(
new ol.style.Style({
image: new ol.style.Circle({
fill: new ol.style.Fill({
color: '#159181'
}),
radius: 8,
stroke: new ol.style.Stroke({
color: '#000000',
width: 1,
}),
}),
}),
);
iconList.push(t);
var iconLayer = new ol.layer.Vector({
source: new ol.source.Vector({
features: iconList,
}),
});
vectorList_19.push(iconLayer);
var vectorList_22 = [];
var iconList = [];
style['670'] = {
'Point': new ol.style.Style({
image: new ol.style.Circle({
fill: new ol.style.Fill({
color: 'rgba(255,255,0,0.6)',
}),
radius: 10,
stroke: new ol.style.Stroke({
color: '#ff0',
width: 1,
}),
}),
}),
'LineString': new ol.style.Style({
stroke: new ol.style.Stroke({
color: '#5a6360',
width: 3,
}),
}),
'MultiLineString': new ol.style.Style({
stroke: new ol.style.Stroke({
color: '#5a6360',
width: 3,
}),
}),
};
// GPX start
var t = new ol.Feature({
geometry: new ol.geom.Point(ol.proj.fromLonLat([10.584539139646, 45.671028637753])),
name: 'Malga Valle',
description: '
Small mountain cottage near the peak of Mount Pizzocolo
'
});
t.setStyle(
new ol.style.Style({
image: new ol.style.Circle({
fill: new ol.style.Fill({
color: '#5a6360'
}),
radius: 8,
stroke: new ol.style.Stroke({
color: '#000000',
width: 1,
}),
}),
}),
);
iconList.push(t);
var iconLayer = new ol.layer.Vector({
source: new ol.source.Vector({
features: iconList,
}),
});
vectorList_22.push(iconLayer);
var vectorList_21 = [];
var iconList = [];
style['502'] = {
'Point': new ol.style.Style({
image: new ol.style.Circle({
fill: new ol.style.Fill({
color: 'rgba(255,255,0,0.6)',
}),
radius: 10,
stroke: new ol.style.Stroke({
color: '#ff0',
width: 1,
}),
}),
}),
'LineString': new ol.style.Style({
stroke: new ol.style.Stroke({
color: '#9ea752',
width: 3,
}),
}),
'MultiLineString': new ol.style.Style({
stroke: new ol.style.Stroke({
color: '#9ea752',
width: 3,
}),
}),
};
// GPX start
var t = new ol.Feature({
geometry: new ol.geom.Point(ol.proj.fromLonLat([10.570558909885, 45.657259340254])),
name: 'S. Urbano\'s lodge',
description: '
Cement roof with fireplace and bivouac'
});
t.setStyle(
new ol.style.Style({
image: new ol.style.Circle({
fill: new ol.style.Fill({
color: '#9ea752'
}),
radius: 8,
stroke: new ol.style.Stroke({
color: '#000000',
width: 1,
}),
}),
}),
);
iconList.push(t);
var iconLayer = new ol.layer.Vector({
source: new ol.source.Vector({
features: iconList,
}),
});
vectorList_21.push(iconLayer);
// PUNTI end ************************************************************************************
var view = new ol.View({
center: ol.proj.transform([10.600677, 45.648558], 'EPSG:4326', 'EPSG:3857'),
//maxZoom: 18,
zoom: 15
})
var map = new ol.Map({
//controls: ol.control.defaults().extend([new ol.control.FullScreen()]),
target: 'map',
overlays: [overlay],
layers: [
// LAYOUT DELLA CARTINA
new ol.layer.Group({
title: 'Show', // A layer must have a title to appear in the layerswitcher
layers: [
new ol.layer.Group({
title: 'Terrain', // A layer must have a title to appear in the layerswitcher
type: 'base', // Setting the layers type to 'base' results in it having a radio button and only one base layer being visibile at a time
combine: true, // Setting combine to true causes sub-layers to be hidden in the layerswitcher, only the parent is shown
visible: false,
layers: [
new ol.layer.Tile({
source: new ol.source.Stamen({
layer: 'terrain'
})
})
]
}),
new ol.layer.Tile({
title: 'Elevation contour lines',
type: 'base',
source: new ol.source.XYZ({
attributions: 'Tiles © ArcGIS',
url: 'https://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/{z}/{y}/{x}',
}),
}),
new ol.layer.Tile({
title: 'Satellite',
type: 'base',
source: new ol.source.XYZ({
attributions: 'Tiles © Esri — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community',
url: 'https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}.jpg',
maxZoom: 19,
}),
}),
new ol.layer.Tile({
title: 'Map', // A layer must have a title to appear in the layerswitcher
type: 'base', // Again set this layer as a base layer
visible: true,
source: new ol.source.OSM()
}),
]
}),
new ol.layer.Group({
title: 'Lodges/shelters',
fold: 'open', // Adding a 'fold' property set to either 'open' or 'close' makes the group layer collapsible
layers: [
new ol.layer.Group({
title: '
The bivouac “Due Aceri” is placed on the southern slope of Mount Pizzocolo (m. 1581), right unter the peak, from where you can enjoy a beatiful panoramic 360° view of the Alpine arc, the Lake Garda, the Lake Valvestino and of the valleys below. A little further up the lodge, there is a small chapel, always open (every 3rd Sunday of June, at 11 a.m.,it is celebrated the Mass). On the top of the mountain there is a cross and some beams pointing towards diffrent mountains. The bivouac, built on the ruins of a military building dating back to the WWI, counts with 1 room with a fireplace, 2 tables with benches and a first aid kit. A ladder takes to a loft. There are no beds nor blankets.
' + hdms + '' ;
overlay.setPosition(geometry);
},
false
);
var zoomto_669 = document.getElementById('zoomto_669');
zoomto_669.addEventListener(
'click',
function (evt) {
var geometry = ol.proj.fromLonLat([10.560180804632, 45.697801215542]);
map.getView().animate({ center: geometry, zoom: 16 }, { duration: 750 });
var hdms = ol.coordinate.toStringHDMS(ol.proj.toLonLat(geometry));
content.innerHTML = '
This lodge is in Campiglio di Cima (Campèi de Sìma), a small locality in Toscolano Maderno, in the Alto Garda Bresciano Natuaral Park, at an altitude of 1.017 m. More than a lodge, it is an actual alpine burg, formed by 3 buildings and a small church named after Madonna della Neve (St. Mary of the Snows). The restoration ended in 2000, thanks to ERSAF (owner of the buildings) and A.N.A., that made the mountain cottages of Campiglio di Cima enjoyable.
' + hdms + '' ;
overlay.setPosition(geometry);
},
false
);
var zoomto_671 = document.getElementById('zoomto_671');
zoomto_671.addEventListener(
'click',
function (evt) {
var geometry = ol.proj.fromLonLat([10.556957635784, 45.678020597491]);
map.getView().animate({ center: geometry, zoom: 16 }, { duration: 750 });
var hdms = ol.coordinate.toStringHDMS(ol.proj.toLonLat(geometry));
content.innerHTML = '
This lodge, property of the CAI of Salò, is open daily from spring to autumn and on the weekends during the rest of the year. It’s a starting point for interesting hikes to the Pizzocolo (1h30m) and to Mount Spino (less than 1h), and for those who wants to try the close vie ferrate. Hospitality, good food and perfect accommodation for families, hikers and mountain bike lovers. The lodge is located at a height of 1165m at the foot of Mount Spino and Pizzocolo.
It has 2 big bedrooms for groups (40 beds) with bathroom. It is possible to use the main room for group meetings
Easy to reach from Toscolano Maderno, the lodge (mt . 1185) was built on a station of the Finance Police and named after Giorgio Pirlo, who died during WW II
' + hdms + '' ;
overlay.setPosition(geometry);
},
false
);
var zoomto_670 = document.getElementById('zoomto_670');
zoomto_670.addEventListener(
'click',
function (evt) {
var geometry = ol.proj.fromLonLat([10.584539139646, 45.671028637753]);
map.getView().animate({ center: geometry, zoom: 16 }, { duration: 750 });
var hdms = ol.coordinate.toStringHDMS(ol.proj.toLonLat(geometry));
content.innerHTML = '
Small mountain cottage near the peak of Mount Pizzocolo
' + hdms + '' ;
overlay.setPosition(geometry);
},
false
);
var zoomto_502 = document.getElementById('zoomto_502');
zoomto_502.addEventListener(
'click',
function (evt) {
var geometry = ol.proj.fromLonLat([10.570558909885, 45.657259340254]);
map.getView().animate({ center: geometry, zoom: 16 }, { duration: 750 });
var hdms = ol.coordinate.toStringHDMS(ol.proj.toLonLat(geometry));
content.innerHTML = '
Cement roof with fireplace and bivouac
' + hdms + '' ;
overlay.setPosition(geometry);
},
false
);
// LINK To POINT end ************************************************************************************
// POPOUP start ************************************************************************************
var element = document.getElementById('popup');
var popup = new ol.Overlay({
element: element,
positioning: 'bottom-center',
stopEvent: false,
offset: [0, 0],
});
map.addOverlay(popup);
map.on('singleclick', function (evt) {
$(element).popover('dispose');
var feature = map.forEachFeatureAtPixel(evt.pixel, function (feature) {
return feature;
});
if (feature) {
var coordinate = evt.coordinate;
var hdms = ol.coordinate.toStringHDMS(ol.proj.toLonLat(coordinate));
content.innerHTML = '' + feature.get('description') + '
' + hdms + '';
overlay.setPosition(coordinate);
}
});
// POPOUP end ************************************************************************************
// Get out-of-the-map div element with the ID "layers" and renders layers to it.
// NOTE: If the layers are changed outside of the layer switcher then you
// will need to call ol.control.LayerSwitcher.renderPanel again to refesh
// the layer tree. Style the tree via CSS.
var sidebar = new ol.control.Sidebar({
element: 'sidebar',
position: 'left'
});
var toc = document.getElementById('layers');
ol.control.LayerSwitcher.renderPanel(map, toc, { reverse: true });
map.addControl(sidebar);
})();