AZM map
by aurbanite
HTML
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css"
integrity="sha512-xodZBNTC5n17Xt2atTPuE1HxjVMSvLVW9ocqUKLsCC5CXdbqCmblAshOMAS6/keqq/sMZMZ19scR4PsZChSR7A=="
crossorigin=""/>
<script src="https://unpkg.com/leaflet@1.7.1/dist/leaflet.js"
integrity="sha512-XQoYMqMTK8LvdxXYG3nZ448hOEQiglfqkJs1NOQV44cWnUrBc8PkAOcXy20w0vlaXaVUearIOBhiXZ5V3ynxwA=="
crossorigin=""></script>
<script src="https://www.akzisemauer-berlin.de/map/js/leaflet.ajax.min.js"></script>
<div id="map" style="width:100%; height: 400px; ">
</div>
JavaScript
var map = L.map('map', {
zoomControl:true, maxZoom:18, minZoom:1
}).setView([52.513660,13.417072], 12);
L.tileLayer('http://a.tiles.wmflabs.org/bw-mapnik/{z}/{x}/{y}.png', {
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
minZoom: 1,
maxZoom: 28,
}).addTo(map);
//Akzisemauer-wand
function akziseWallStyle(feature) {
return {
color: wall_color(feature.properties.bezirk),
weight: 3,
};
}
function wall_color(bezirk) {
if(bezirk === "Friedrichshain-Kreuzberg") return "#e5b813"; else
return "#666666";
}
var akzise_wall = new L.GeoJSON.AJAX("https://www.akzisemauer-berlin.de/map/data/akzise_wall.geojson",{
style:akziseWallStyle});
akzise_wall.addTo(map);
//AKzisemauer-Tore
// markerpopup function
function markerpopup(feature, layer) {
if (feature.properties && feature.properties.name) {
layer.bindPopup(feature.properties.name);
}
}
var akziseGateFHXBStyle = {
radius: 8,
fillColor: "#e5b813",
color: "#000",
weight: 0.3,
opacity: 1,
fillOpacity: 0.8
}
var akzise_gates_FHXB = new L.GeoJSON.AJAX("https://www.akzisemauer-berlin.de/map/data/akzise_gates_FHXB.geojson", {
pointToLayer: function (feature, latlng) {
return L.circleMarker(latlng, akziseGateFHXBStyle)
}}, {
onEachFeature: markerpopup
});
akzise_gates_FHXB.addTo(map);
var akziseGatePBMIStyle = {
radius: 8,
fillColor: "#666666",
color: "#000",
weight: 0.3,
opacity: 1,
fillOpacity: 0.8
}
var akzise_gates_PBMI = new L.GeoJSON.AJAX("https://www.akzisemauer-berlin.de/map/data/akzise_gates_PBMI.geojson", {
pointToLayer: function (feature, latlng) {
return L.circleMarker(latlng, akziseGatePBMIStyle)
}}, {
onEachFeature: markerpopup
});
akzise_gates_PBMI.addTo(map);
marker = new L.CircleMarker([ 52.513660,13.417072], { radius: 10, color: 'green',...