This commit is contained in:
Anton 2021-02-05 11:18:58 +01:00
parent 28411d9483
commit 4f9de8cb2e

View File

@ -43,7 +43,7 @@ function makeMarker($id){ // generate appropriate markers based on latest JSON
}; };
//check if scooters is dead //check if scooters is dead
if($act === "DAMAGED" || $act === "MAINTAINANCE" || $act === "OUT_OF_ORDER" || $act === "GPS_ISSUE"){ if($act === "DAMAGED" || $act === "MAINTENANCE" || $act === "OUT_OF_ORDER" || $act === "GPS_ISSUE"){
$marker = 'var scooter'.$nam.' = L.marker(['.$pos.'], {time: "'.$lst.'"}).addTo(map) $marker = 'var scooter'.$nam.' = L.marker(['.$pos.'], {time: "'.$lst.'"}).addTo(map)
.bindPopup("<b>'.$nam.'</b><br><b>batteryLevel:</b>'.$bat.'<br><b>Status: </b>'.$act.'<br>Last updated: '.$lst=str_replace(array('T', 'Z'), ' ', $lst).'") .bindPopup("<b>'.$nam.'</b><br><b>batteryLevel:</b>'.$bat.'<br><b>Status: </b>'.$act.'<br>Last updated: '.$lst=str_replace(array('T', 'Z'), ' ', $lst).'")
.bindTooltip("'.$nam.'").setIcon(isMaintenanceIcon);'; .bindTooltip("'.$nam.'").setIcon(isMaintenanceIcon);';