Itinerario Pasoliniano
translations['openlayer'] = "open layer";
translations['openlayerAtStartup'] = "open layer at startup";
translations['generateLink'] = "link to this map with opened layers";
translations['shortDescription'] = "short description";
translations['generatedShortCode'] = "to get a text control link paste this code in your wordpress editor";
translations['closeLayer'] = "close layer";
translations['cantGenerateLink'] = "put this string in the existing map short code to control this map";
vectorM['map_ol3js_1'] = [];
var raster = getTileLayer("osm","NoKey");
var map_ol3js_1 = new ol.Map({
interactions: ol.interaction.defaults.defaults({mouseWheelZoom:false}),
layers: [raster],
target: "map_ol3js_1",
view: new ol.View({
center: ol.proj.transform([6.378,58.213], "EPSG:4326", "EPSG:3857"),
zoom: 9
})
});
var style0 = {
"Point": [new ol.style.Style({
image: new ol.style.Icon({
anchor: [0.5, 41],
anchorXUnits: "fraction",
anchorYUnits: "pixels",
opacity: 0.75,
src: "https://www.itinerarieluoghi.it/wp-content/plugins/osm/icons/mic_blue_pinother_02.png"
})
})],
"LineString": [new ol.style.Style({
stroke: new ol.style.Stroke({
color: "none",
width: 8
})
})],
"MultiLineString": [new ol.style.Style({
stroke: new ol.style.Stroke({
color: "none",
width: 4
})
})]
};
var vectorL0 = new ol.layer.Vector({
source: new ol.source.Vector({
url:"/wp-content/uploads/2023/06/Traccia-Itinerario-Pasoliniano.gpx",
format: new ol.format.GPX({
extractStyles: false
})
}),
zIndex: 92,
style: function(feature, resolution) {return style0[feature.getGeometry().getType()];}
});
map_ol3js_1.addLayer(vectorL0);
var extension1 = ol.extent.createEmpty();
var curZoom1 = map_ol3js_1.getView().getZoom();
map_ol3js_1.getLayers().forEach(function(layer){
if(!layer.get("id")) {
layer.once("change", function(e){
ol.extent.extend(extension1, (layer.getSource().getExtent()));
map_ol3js_1.getView().fit(extension1, {padding: [50, 50, 50, 50]});
});
}
});
addControls2Map(map_ol3js_1,0,0,3,0,5,6,7,0,1);
osm_addPopupClickhandler(map_ol3js_1, "map_ol3js_1");
osm_addMouseHover(map_ol3js_1);