This commit is contained in:
Walter Hupfeld
2023-07-28 20:11:45 +02:00
parent b48d66479f
commit 0ae8f915c4
3 changed files with 75 additions and 38 deletions

View File

@@ -113,7 +113,7 @@
$strDescription=generate_tooltip_description($row);
$strCategory=generate_category($row);
$arrMarker[]="marker[".$id."] = [L.marker([".$numLat."," .$numLng."],"
." { icon: ".$arrMarkerType[$topic]." }),'check_".$strCategory."'];\n"
." { icon: ".$arrMarkerType[$topic]." }),'".$strCategory."'];\n"
."marker[".$id."][0].addTo(mymap);\n "
."marker[".$id."][0].bindPopup('".$strDescription."');";
$numId++;
@@ -311,25 +311,54 @@
if (jQuery(this).prop("checked")) {
jQuery.each(marker, function(key, value) {
console.log(value);
if (value) {
if (filter.match(value[1]))
{ value[0].addTo(mymap); }
if (filter.match(value[1])) { value[0].addTo(mymap); }
}
});
} else {
jQuery.each(marker, function(key, value) {
if (value) {
if (filter.match(value[1]))
{ value[0].remove(); }
if (filter.match(value[1])) { value[0].remove(); }
}
});
}
})
$('#check_art').click(function(){
if (jQuery(this).prop("checked")) {
$('.uart').prop( "checked", true );
} else {
$('.uart').prop( "checked", false );
}
});
$('#check_kat').click(function(){
console.log("test");
if (jQuery(this).prop("checked")) {
$('.ukat').prop( "checked", true );
} else {
$('.ukat').prop( "checked", false );
}
});
$('#check_typ').click(function(){
if (jQuery(this).prop("checked")) {
$('.utyp').prop( "checked", true );
} else {
$('.utyp').prop( "checked", false );
}
});
$('#check_art').click(function(){
if (jQuery(this).prop("checked")) {
$('.uart').prop( "checked", true );
} else {
$('.uart').prop( "checked", false );
}
});
function myFunction(chosen) {
console.log(chosen);
}
</script>