|
|
|
@ -95,9 +95,11 @@
|
|
|
|
|
$arrMarker = array();
|
|
|
|
|
$arrDescription = array();
|
|
|
|
|
$description="";
|
|
|
|
|
$numId=0;
|
|
|
|
|
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
|
|
|
|
|
//print_r($row);echo "<hr>";
|
|
|
|
|
$id = $row['OBJECTID'];
|
|
|
|
|
//$id = $row['OBJECTID'];
|
|
|
|
|
$id=$numId;
|
|
|
|
|
$numLng = $row['XGCSWGS84'];
|
|
|
|
|
$numLat = $row['YGCSWGS84'];
|
|
|
|
|
if ($row['IstRad']) $description .="mit Fahrradbeteiligung, ";
|
|
|
|
@ -109,12 +111,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$strDescription=generate_tooltip_description($row);
|
|
|
|
|
|
|
|
|
|
$strCategory=generate_category($row);
|
|
|
|
|
$arrMarker[]="marker[".$id."] = [L.marker([".$numLat."," .$numLng."],"
|
|
|
|
|
." { icon: ".$arrMarkerType[$topic]." }),'check_".$topic."'];\n"
|
|
|
|
|
." { icon: ".$arrMarkerType[$topic]." }),'check_".$strCategory."'];\n"
|
|
|
|
|
."marker[".$id."][0].addTo(mymap);\n "
|
|
|
|
|
."marker[".$id."][0].bindPopup('".$strDescription."');";
|
|
|
|
|
$numId++;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$markerid=$id+1;
|
|
|
|
|
/*
|
|
|
|
|
marker[val.id] = [L.marker([val.lat, val.lng], { "icon": L.MakiMarkers.icon({ "color": color, "size": "m", "icon": "circle" }) }).bindPopup(html), val.membertype];
|
|
|
|
@ -302,17 +306,21 @@
|
|
|
|
|
// Hide and show marker form checkbox ----------------------------------------
|
|
|
|
|
|
|
|
|
|
$('.check').click(function() {
|
|
|
|
|
bereich = this.name;
|
|
|
|
|
filter = this.name;
|
|
|
|
|
console.log(filter);
|
|
|
|
|
|
|
|
|
|
if (jQuery(this).prop("checked")) {
|
|
|
|
|
jQuery.each(marker, function(key, value) {
|
|
|
|
|
if (value) {
|
|
|
|
|
if (value[1] == bereich) { value[0].addTo(mymap); }
|
|
|
|
|
if (filter.match(value[1]))
|
|
|
|
|
{ value[0].addTo(mymap); }
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
jQuery.each(marker, function(key, value) {
|
|
|
|
|
if (value) {
|
|
|
|
|
if (value[1] == bereich) { value[0].remove(); }
|
|
|
|
|
if (filter.match(value[1]))
|
|
|
|
|
{ value[0].remove(); }
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|