(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_a = [];
var iconList = [];
style['753'] = {
'LineString': new ol.style.Style({
stroke: new ol.style.Stroke({
color: 'red',
width: 3,
}),
}),
'MultiLineString': new ol.style.Style({
stroke: new ol.style.Stroke({
color: 'red',
width: 3,
}),
}),
};
// GPX start
var vectorgpx = new ol.layer.Vector({
name: 'Toscolano - Pulciano',
description: ' ',
source: new ol.source.Vector({
url: ['/files/gpx/track_H.gpx'],
radius: 0,
format: new ol.format.GPX()
}),
style: function (feature) {
return style['753'][feature.getGeometry().getType()];
},
});
vectorList_a.push(vectorgpx);
var iconLayer = new ol.layer.Vector({
source: new ol.source.Vector({
features: iconList,
}),
});
vectorList_a.push(iconLayer);
var vectorList_27 = [];
var iconList = [];
style['740'] = {
'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: '#e7ceb0',
width: 3,
}),
}),
'MultiLineString': new ol.style.Style({
stroke: new ol.style.Stroke({
color: '#e7ceb0',
width: 3,
}),
}),
};
// GPX start
var t = new ol.Feature({
geometry: new ol.geom.Point(ol.proj.fromLonLat([10.618579915812077, 45.64616360829389])),
name: 'Delai Palace',
description: '
The palace dates back to the 17th Century, flanked by several lemon groves, still visible today, a garden on the lakeshore and has fine frescoes on the external plasters. Here, Scipione Delai hosted Andrea Celesti, who realized numerous canvases fo this palace, today in Brescia.
The property passed to the Maffizzoli and the Oldi'
});
t.setStyle(
new ol.style.Style({
image: new ol.style.Circle({
fill: new ol.style.Fill({
color: '#e7ceb0'
}),
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_27.push(iconLayer);
var vectorList_24 = [];
var iconList = [];
style['711'] = {
'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: '#be6acd',
width: 3,
}),
}),
'MultiLineString': new ol.style.Style({
stroke: new ol.style.Stroke({
color: '#be6acd',
width: 3,
}),
}),
};
// GPX start
var t = new ol.Feature({
geometry: new ol.geom.Point(ol.proj.fromLonLat([10.616715872936, 45.65003075128])),
name: 'S. Michele\'s Church',
description: '
The old parish church dates back to the 15th Century and it’s right in front of the new parish. Probably built on the ruins of an old fortalice, documented as castellum (castle) in the Middle Ages. San Michele was the main saint for the Longobards. The tower bell looks like a defence tower, at its base there is a “recycled” roman inscription recalling Antoninus Pius and Marcus Aurelius. The portico dates back to the 16th C The church had 3 altars dedicated to San Michele, San Rocco and the Trinity, it was surrounded by a cemetery, a rectory and a rural house. It is now seat of meetings and offices.'
});
t.setStyle(
new ol.style.Style({
image: new ol.style.Circle({
fill: new ol.style.Fill({
color: '#be6acd'
}),
radius: 8,
stroke: new ol.style.Stroke({
color: '#000000',
width: 1,
}),
}),
}),
);
iconList.push(t);
style['714'] = {
'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: '#be6acd',
width: 3,
}),
}),
'MultiLineString': new ol.style.Style({
stroke: new ol.style.Stroke({
color: '#be6acd',
width: 3,
}),
}),
};
// GPX start
var t = new ol.Feature({
geometry: new ol.geom.Point(ol.proj.fromLonLat([10.618391662415, 45.64467700808])),
name: 'Santuario di Santa Maria del Benaco',
description: '
The small Church situated at the back of the parish is dedicated to Santa Maria del Benaco and it boasts very ancient origins. The existing plant, which is rectangular with a single nave, dates back to the XV century. If the external appearance is poor and without decorations, the inside is full of beautiful frescoes dating back to the second half of the 15th century and completed in 1514, representing emblems of the important families that contributed to the restoration of the church and were buried here.
The four columns in the middle of the parvis were part of a medieval or romanic ciborium demolished in 1580 by order of Carlo Borromeo, because the main altar had a pagan capitel representing Jupiter Ammon
During the restoration works in 1829 a mosaic floo came to light, probably it belonged to the Roman Villa
'
});
t.setStyle(
new ol.style.Style({
image: new ol.style.Circle({
fill: new ol.style.Fill({
color: '#be6acd'
}),
radius: 8,
stroke: new ol.style.Stroke({
color: '#000000',
width: 1,
}),
}),
}),
);
iconList.push(t);
style['705'] = {
'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: '#be6acd',
width: 3,
}),
}),
'MultiLineString': new ol.style.Style({
stroke: new ol.style.Stroke({
color: '#be6acd',
width: 3,
}),
}),
};
// GPX start
var t = new ol.Feature({
geometry: new ol.geom.Point(ol.proj.fromLonLat([10.617672904071, 45.644477614539])),
name: 'St. Peter and St. Paul\'s Church',
description: '
Built in 1584 on the ruins of an old parish church. The austere façade, realized during the XVII Century decorated with two S. Peter statues and two angels, elaborate marble columns, the main two coming from the adjacent Roman Villa. The inside of the church is a proper art gallery with canvases painted by Andrea Celesti between 1688 and the first decade of the 18th Century, depicting S. Peter and Paul’s life. Andrea Celesti relized also the fresco in the apse and in the presbytery, for this reason known as Celest’s Sistine Chapel. There are a lot of tombstones on the floor belonging to the most important families that made the history of Toscolano between the 16th and 17th Century.'
});
t.setStyle(
new ol.style.Style({
image: new ol.style.Circle({
fill: new ol.style.Fill({
color: '#be6acd'
}),
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_24.push(iconLayer);
var vectorList_26 = [];
var iconList = [];
style['717'] = {
'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: '#3aa25f',
width: 3,
}),
}),
'MultiLineString': new ol.style.Style({
stroke: new ol.style.Stroke({
color: '#3aa25f',
width: 3,
}),
}),
};
// GPX start
var t = new ol.Feature({
geometry: new ol.geom.Point(ol.proj.fromLonLat([10.61828302752718, 45.643419392202766])),
name: 'The Roman Villa',
description: '


' + 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);
})();