diff --git a/css/style.css b/css/style.css
index 9d972fe..7baa7f9 100644
--- a/css/style.css
+++ b/css/style.css
@@ -91,4 +91,6 @@ i.wa {
display:none;
}
+h5 {margin-top:15px;}
+
.statistik td, th {border: 1px solid grey; font-size: smaller;}
\ No newline at end of file
diff --git a/index.php b/index.php
index 401f42f..b296e55 100644
--- a/index.php
+++ b/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);
-}
+
diff --git a/lib/functions.php b/lib/functions.php
index 26c67de..a9c3f9f 100644
--- a/lib/functions.php
+++ b/lib/functions.php
@@ -11,7 +11,6 @@ function generate_tooltip_description($row) {
global $arrWochentage;
global $db;
-
$strDescription = "
Daten zum Unfall
";
$description = "Unfallkategorie: ".$arrCategory[$row['UKATEGORIE']]."
";
$description .= "Unfallmonat/Jahr: ".$row['UMONAT']."/".$row['UJAHR']."
";
@@ -29,17 +28,19 @@ function generate_tooltip_description($row) {
if ($row['IstSonstige']) $description .="mit Beteiligung eines oben nicht genannten Verkehrsmittels";
$strDescription .= nl2br2($description);
-
return $strDescription;
}
function generate_category($row) {
- return "UART_".$row['UART']."|UKATEGORIE_".$row['UKATEGORIE'];
+ $strReturn = "UART_".$row['UART']."|UKATEGORIE_".$row['UKATEGORIE']."|UTYP_".$row['UTYP1'];
+ if ($row['IstRad']) $strReturn .="|UBETEILIGT_RAD";
+ if ($row['IstPKW']) $strReturn .="|UBETEILIGT_PKW";
+ if ($row['IstFuss']) $strReturn .="|UBETEILIGT_FUSS";
+ if ($row['IstKrad']) $strReturn .="|UBETEILIGT_KRAD";
+ if ($row['IstGkfz']) $strReturn .="|UBETEILIGT_LKW";
+ if ($row['IstSonstige']) $strReturn .="|UBETEILIGT_SONSTIGES";
+ return $strReturn;
}
-/**
- * reads gps location form picture data
- */
-
function read_gps_location($file){
@@ -96,13 +97,13 @@ function nl2br2($string) {
global $arrCategory;
global $strLocation;
- $strTable="Unfallkategorie
";
+ $strTable="Unfallkategorie
";
$strTable.="