(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_38 = [];
var iconList = [];
style['658'] = {
'LineString': new ol.style.Style({
stroke: new ol.style.Stroke({
color: 'black',
width: 3,
}),
}),
'MultiLineString': new ol.style.Style({
stroke: new ol.style.Stroke({
color: 'black',
width: 3,
}),
}),
};
// GPX start
var vectorgpx = new ol.layer.Vector({
name: 'Bombai - Vigole - Sanico',
description: 'From the Piazza del Ponte of Toscolano take the road to Maclino .
After about 200 mt. take the steep paved road on the right. When you reach the fork, keep climbing and a little beyond the site of the municipal waterworks turn left into a dirt road.
After about a few hundred metres you reach a gate, to the left of which you see the track of your path. Follow it and go into the dale of Bombai. Cross the small bridge over the stream to reach the right-hand side of the dale. Continue uphill and, at the fork, take the left to reach a fine panoramic point, walk back and continue along the path as far as the hamlet of Vigole.
Go past the fountain in the small square and you see the tiny church of Vigole. Climb on along the cobbled lane as far as Rosei and keep the right and reach a votive shrine near the village of Sanico.
Take the downhill paved lane to the right of the shrine and walk all the way back to your starting point. On the way you will see the small church of S. Martino (totally worth a visit)',
source: new ol.source.Vector({
url: ['/files/gpx/track_N.gpx'],
radius: 0,
format: new ol.format.GPX()
}),
style: function (feature) {
return style['658'][feature.getGeometry().getType()];
},
});
vectorList_38.push(vectorgpx);
var iconLayer = new ol.layer.Vector({
source: new ol.source.Vector({
features: iconList,
}),
});
vectorList_38.push(iconLayer);
var vectorList_23 = [];
var iconList = [];
style['744'] = {
'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: '#385e39',
width: 3,
}),
}),
'MultiLineString': new ol.style.Style({
stroke: new ol.style.Stroke({
color: '#385e39',
width: 3,
}),
}),
};
// GPX start
var t = new ol.Feature({
geometry: new ol.geom.Point(ol.proj.fromLonLat([10.608396690330533, 45.64106543677046])),
name: 'Former Town Hall',
description: '
It belonged to Ettore Bianchi, who had been manager of the Maffizzoli Papermill for several years, it is now seat of the Library and the Ecomuseum. On the base of the balcony the writing NULLA DIES SINE LINE, \"not a day without tracing a line\" a quote attributed to Apelles.'
});
t.setStyle(
new ol.style.Style({
image: new ol.style.Circle({
fill: new ol.style.Fill({
color: '#385e39'
}),
radius: 8,
stroke: new ol.style.Stroke({
color: '#000000',
width: 1,
}),
}),
}),
);
iconList.push(t);
style['730'] = {
'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: '#385e39',
width: 3,
}),
}),
'MultiLineString': new ol.style.Style({
stroke: new ol.style.Stroke({
color: '#385e39',
width: 3,
}),
}),
};
// GPX start
var t = new ol.Feature({
geometry: new ol.geom.Point(ol.proj.fromLonLat([10.609055700445758, 45.64140801163121])),
name: 'The old Bridge',
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);
})();