|
|
@ -47,6 +47,13 @@ function makeMarker($id){ // generate appropriate markers based on latest JSON |
|
|
|
$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).'") |
|
|
|
.bindTooltip("'.$nam.'").setIcon(isMaintenanceIcon);'; |
|
|
|
}; |
|
|
|
|
|
|
|
//check if scooters is lost |
|
|
|
if($act === "LOST"){ |
|
|
|
$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).'") |
|
|
|
.bindTooltip("'.$nam.'").setIcon(isLostIcon);'; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
@ -107,6 +114,9 @@ function makeMarker($id){ // generate appropriate markers based on latest JSON |
|
|
|
{"icon": "wrench", "iconColor": "white", "markerColor": "black", "prefix": "fa"} |
|
|
|
); |
|
|
|
|
|
|
|
var isLostIcon = L.AwesomeMarkers.icon( |
|
|
|
{"icon": "question", "iconColor": "white", "markerColor": "black", "prefix": "fa"} |
|
|
|
); |
|
|
|
|
|
|
|
var map = L.map('map', { zoomControl: false, attributionControl: false }).setView([52.516190, 13.377693], 11.5); |
|
|
|
|
|
|
|