This commit is contained in:
Walter Hupfeld
2023-07-28 22:36:31 +02:00
parent 0ae8f915c4
commit e18ee929a6
3 changed files with 55 additions and 37 deletions

View File

@@ -220,9 +220,8 @@
<div id="loader"><img src="css/images/ajax-loader.gif"></div>
<script>
// Map ----------------------------------------------------------------------
var mymap = L.map('mapid').setView([<?=$numInfoLat ?>, <?=$numInfoLng ?>], <?=$numZoom ?>);
@@ -311,7 +310,6 @@
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); }
}
@@ -325,11 +323,29 @@
}
})
function check_all(){
jQuery.each(marker, function(key, value) {
console.log(value);
if (value) { value[0].addTo(mymap); }
});
};
function uncheck_all()
{
jQuery.each(marker, function(key, value) {
console.log(value);
if (value) { value[0].remove(); }
});
};
$('#check_art').click(function(){
if (jQuery(this).prop("checked")) {
$('.uart').prop( "checked", true );
check_all();
} else {
$('.uart').prop( "checked", false );
uncheck_all();
}
});
@@ -337,24 +353,30 @@
console.log("test");
if (jQuery(this).prop("checked")) {
$('.ukat').prop( "checked", true );
check_all();
} else {
$('.ukat').prop( "checked", false );
uncheck_all();
}
});
$('#check_typ').click(function(){
if (jQuery(this).prop("checked")) {
$('.utyp').prop( "checked", true );
check_all();
} else {
$('.utyp').prop( "checked", false );
uncheck_all();
}
});
$('#check_art').click(function(){
if (jQuery(this).prop("checked")) {
$('.uart').prop( "checked", true );
check_all();
} else {
$('.uart').prop( "checked", false );
uncheck_all();
}
});