Connection to database failed: Possibly the server was restarted. It takes about 10 minutes to read the database. Please try again later!
Verbindung zur Datenbank fehlgeschlagen: Eventuell wurde der Server neu gestartet.
Das Einlesen der Datenbank dauert etwa 10 Minuten. Bitte versuchen Sie es später noch einmal!
let url = location.protocol + "//" + location.host + "/img/";
let map = L.map('map', {
center: [52.35445689451,7.9687276062727],
zoom: 12,
zoomControl: false,
tap: false
});
//Layers - OSM is pre selected
//variable for OSM
let OpenStreetMap_DE = L.tileLayer('https://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png', {
maxZoom: 19,
attribution: '© OpenStreetMap contributors'
}).addTo(map);
//Variables for Bing
let BING_KEY = 'AlqnXp9wAwXT2E5_GRJanH9Xrx-olcRR7s8LBnkbiOkD6w-2Z4Cw4l3zuLZFN35M'
//Bing aerial
let bingLayerAerial = L.tileLayer.bing(BING_KEY)
//Bing road
let bingLayerRoad = L.tileLayer.bing({
bingMapsKey: BING_KEY,
imagerySet: 'RoadOnDemand',
culture: 'de_DE'
})
//openRailway
let OpenRailwayMap = L.tileLayer('https://{s}.tiles.openrailwaymap.org/standard/{z}/{x}/{y}.png', {
maxZoom: 19,
attribution: 'Map data: © OpenStreetMap contributors | Map style: © OpenRailwayMap (CC-BY-SA)'
})
//draw circle
//city boarders = Polygon
let cityBorders = new L.geoJSON({"type":"Polygon","coordinates":[[[7.957471140269444,52.34696131351462],[7.956651933210063,52.3614596865194],[7.979987869491966,52.361951777140185],[7.980799571919611,52.34745324946729],[7.957471140269444,52.34696131351462]]]}, {
radius: 10,
color: 'blue',
fillColor: '#FFF'
}
).addTo(map);
//Marker Icons
let LeafIcon = L.Icon.extend({
options: {
iconSize: [32, 37],
}
}
)
let cityMarker = new LeafIcon (
{
iconUrl: url + "stadt-icon.png"
}
)
let stopMarker = new LeafIcon (
{
iconUrl: url + "2726.png"
}
)
let stationMarker = new LeafIcon (
{
iconUrl: url + "2725.png"
}
)
let restaurantMarker = new LeafIcon (
{
iconUrl: url + ".png"
}
)
let myPositionMarker = new LeafIcon (
{
iconUrl: url + "myPosition.png"
}
)
//Center Icon
let centerMarker = L.marker([52.35445689451,7.9687276062727], {icon: cityMarker})
centerMarker.bindPopup('Errechneter Stadtmittelpunkt');
function popUp(f,l){
let out = [];
if (f.properties){
for(key in f.properties){
if (key === 'name') {
f.properties[key] = '