checkbox
This commit is contained in:
45
index.php
45
index.php
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user