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: [53.740056336448,11.272830963135],
zoom: 15,
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
let circle = L.circle([53.740056336448,11.272830963135], {
radius: 1000,
color: '#18BC9C',
fillOpacity: 0.05
});
circle.addTo(map);
//city boarders = Polygon
//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([53.740056336448,11.272830963135], {icon: myPositionMarker})
centerMarker.bindPopup('Mein Standort
53.740056336448,11.272830963135').addTo(map);
function popUp(f,l){
let out = [];
if (f.properties){
for(key in f.properties){
if (key === 'name') {
f.properties[key] = '