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.325242085647,13.626909255981], 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([52.325242085647,13.626909255981], { 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([52.325242085647,13.626909255981], {icon: myPositionMarker}) centerMarker.bindPopup('Mein Standort
52.325242085647,13.626909255981').addTo(map); function popUp(f,l){ let out = []; if (f.properties){ for(key in f.properties){ if (key === 'name') { f.properties[key] = '
'+ f.properties[key] + '
'; } out.push(f.properties[key]); } l.bindPopup(out.join("
")); } } let hs = new L.geoJSON({"type": "FeatureCollection", "features": [{type: "Feature", "properties": {"name": "A10 Center Ost", "street": "Bahnhofstrasse ", "URL": "Show details<\/a>"}, "geometry": {"type":"Point","coordinates":[13.634119033813,52.320153380323]}},{type: "Feature", "properties": {"name": "Bergstr.", "street": "Grabowskistrasse 48", "URL": "Show details<\/a>"}, "geometry": {"type":"Point","coordinates":[13.617811203003,52.320756711018]}},{type: "Feature", "properties": {"name": "Dorfaue", "street": "Dorfaue 2", "URL": "Show details<\/a>"}, "geometry": {"type":"Point","coordinates":[13.615107536316,52.322802727774]}},{type: "Feature", "properties": {"name": "Fichtestr.", "street": "Schillerallee 12", "URL": "Show details<\/a>"}, "geometry": {"type":"Point","coordinates":[13.620557785034,52.322881418837]}},{type: "Feature", "properties": {"name": "Fliederweg", "street": "Freiheitstrasse 20", "URL": "Show details<\/a>"}, "geometry": {"type":"Point","coordinates":[13.619012832642,52.324061767986]}},{type: "Feature", "properties": {"name": "Fr.-Engels-Str.", "street": "L401 ", "URL": "Show details<\/a>"}, "geometry": {"type":"Point","coordinates":[13.637380599976,52.324402751878]}},{type: "Feature", "properties": {"name": "Gesundheitszentrum", "street": "Freiheitstrasse 69", "URL": "Show details<\/a>"}, "geometry": {"type":"Point","coordinates":[13.626909255981,52.325242085647]}},{type: "Feature", "properties": {"name": "Ehrenmal", "street": "Freiheitstrasse ", "URL": "Show details<\/a>"}, "geometry": {"type":"Point","coordinates":[13.638024330139,52.326868249513]}},{type: "Feature", "properties": {"name": "Birkenallee", "street": "Birkenallee 2", "URL": "Show details<\/a>"}, "geometry": {"type":"Point","coordinates":[13.63570690155,52.327051844904]}},{type: "Feature", "properties": {"name": "Hahnenbalz", "street": "Wildbahn 21", "URL": "Show details<\/a>"}, "geometry": {"type":"Point","coordinates":[13.632016181946,52.327261667275]}},{type: "Feature", "properties": {"name": "Im R\u00f6thegrund", "street": "Wildbahn 75", "URL": "Show details<\/a>"}, "geometry": {"type":"Point","coordinates":[13.62476348877,52.328782849704]}},]}, { pointToLayer: function(point, latlng) { return L.marker(latlng, {icon: stopMarker}); }, onEachFeature: popUp }); let hsCluster = L.markerClusterGroup(); hs.addTo(hsCluster); hsCluster.addTo(map); let station =L.geoJSON({"type": "FeatureCollection", "features": [{type: "Feature", "properties": {"name": "Bahnhof", "street": "Karl-Marx-Stra\u00dfe 22", "URL": "Show details<\/a>"}, "geometry": {"type":"Point","coordinates":[13.634119033813,52.320022220388]}},]}, { pointToLayer: function(point, latlng) { return L.marker(latlng, {icon: stationMarker}); }, onEachFeature: popUp }); let stationCluster = L.markerClusterGroup(); station.addTo(stationCluster); stationCluster.addTo(map); //variable for control.layer let basemaps = { "OpenStreetMap": OpenStreetMap_DE, "Bing Strasse": bingLayerRoad, "Bing Luftbild": bingLayerAerial, "Bahnstrecken": OpenRailwayMap }; let overlays = { "My Position": centerMarker, "Stops": hsCluster, "Station": stationCluster, } //control for zoom L.control.zoom({ zoomInTitle: 'hineinzoomen', zoomOutTitle: 'herauszoomen', zoomInText: '', zoomOutText: '', }).addTo(map); //Layer control L.control.layers(basemaps,overlays).addTo(map);