Nearby:
";
var num=others.length;
for(i=0; i< num;i++)
{
if(others[i].distance == 0) continue;
//var dist=L.GeometryUtil.readableDistance(others[i].distance, 'metric');
var dist=L.GeometryUtil.length([others[i].latlng, nearBy.latlng]);
html += others[i].layer.properties.html.replace('
','
( ' + Math.ceil(dist / 1000) + ' km )') + "
";
}
html += "
";
}
}
$(".map_container .infobox").html(html);
$(".map_container .infobox_outer").scrollTop(0);
if(!$(".map_container .infobox_outer").hasClass("expanded"))
{
$(".map_container .infobox_outer").addClass("expanded");
if(!isInfoOnTop)
$(".map_container .infobox_outer").animate({'width': horzExtent,opacity: 1,});
else
$(".map_container .infobox_outer").animate({'height': '30%',opacity: 1});
}
if(!L.Browser.mobile)
$(".map_container .infobox_outer").getNiceScroll().resize();
}
function initializeMap(el)
{
var map = new L.Map(el, {
attributionControl: true,
dragging: false,
zoomControl: true,
fadeAnimation: true,
markerZoomAnimation: true,
zoomAnimation: true,
tap: true,
touchZoom: true,
tapTolerance: 32,
maxZoom: 16,
gestureHandling: true,
/*
fullscreenControl: {
pseudoFullscreen: false, // if true, fullscreen to page width and height
title: {
'false': 'Vollbildansich',
'true': 'Vollbild beenden'
}
},
*/
// zoom: 6,
// minZoom: 6,
});
map.zoomControl.setPosition('bottomright');
// map.fullscreenControl.setPosition('bottomright');
map.addControl(new fullscreenControl());
return map;
}
function getScreenWidth(){
if (!window) {
return null;
}
const docElement = document.documentElement;
const body = document.getElementsByTagName('body')[0];
return window.innerWidth || docElement.clientWidth || body.clientWidth;
}
function getUrlParameter(name) {
name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]');
var regex = new RegExp('[\\?&]' + name + '=([^&#]*)');
var results = regex.exec(location.search);
return results === null ? '' : decodeURIComponent(results[1].replace(/\+/g, ' '));
};
})(jQuery);