This commit is contained in:
Walter Hupfeld 2025-07-14 17:11:01 +02:00
parent 713e83e89e
commit e2307b881d

View File

@ -30,12 +30,6 @@
<link rel="stylesheet" href="css/leaflet.css" />
<link rel="stylesheet" href="css/leaflet.awesome-markers.css" />
<link rel="stylesheet" href="css/style.css" />
<link rel="stylesheet" href="vendor/Leaflet.markercluster/dist/MarkerCluster.css" />
<link rel="stylesheet" href="vendor/Leaflet.markercluster/dist/MarkerCluster.Default.css" />
<script src="vendor/Leaflet.markercluster/dist/leaflet.markercluster-src.js"></script>
<title><?= $strTitle ?></title>
</head>
@ -137,8 +131,6 @@
<!-- row -->
</div>
<!-- container-fluid -->
<script>
// Map ----------------------------------------------------------------------
var mymap = L.map('mapid').setView([<?=$numInfoLat ?>, <?=$numInfoLng ?>], <?=$numZoom ?>);
@ -179,6 +171,7 @@
}
//Hamm-Layer - todo invers area ---------------------------------------
var myStyle = {
"color": "grey",
"fillColor": "lightblue",
@ -192,32 +185,6 @@
});
districtLayer.addTo(mymap);
var geoJsonData = {
"type": "FeatureCollection",
"features": [
{ "type": "Feature", "id":"1", "properties": { "address": "2" }, "geometry": { "type": "Point", "coordinates": [51.6792,7.77693] } },
{ "type": "Feature", "id":"2", "properties": { "address": "151" }, "geometry": { "type": "Point", "coordinates": [51.6787,7.77699] } },
{ "type": "Feature", "id":"3", "properties": { "address": "21" }, "geometry": { "type": "Point", "coordinates": [51.6777,7.77690] } },
{ "type": "Feature", "id":"4", "properties": { "address": "14" }, "geometry": { "type": "Point", "coordinates": [51.6798,7.77692] } },
{ "type": "Feature", "id":"5", "properties": { "address": "38B" }, "geometry": { "type": "Point", "coordinates": [51.6800,7.77700] } },
{ "type": "Feature", "id":"6", "properties": { "address": "38" }, "geometry": { "type": "Point", "coordinates": [51.6747,7.77683] } }
]
};
var markers = L.markerClusterGroup();
var geoJsonLayer = L.geoJson(geoJsonData, {
onEachFeature: function (feature, layer) {
layer.bindPopup(feature.properties.address);
}
});
markers.addLayer(geoJsonLayer);
//mymap.addLayer(markers);
// mymap.fitBounds(markers.getBounds());
// Marker from database -------------------------------------------------------
var marker = [];
@ -233,13 +200,16 @@
// Info-Marker für Start --------------------------------------------------------
var marker2 = L.marker([<?=$numInfoLat?>, <?=$numInfoLng?>], { icon: infoMarker }).addTo(mymap);
<?php
echo "marker2.bindPopup('".$strIntro."');";
if ($numVehicle==0) {
echo "marker2.openPopup();";
}
?>
// Hide and show marker form checkbox ----------------------------------------