Browse Source

added new icons for scooters that are low on battery

master
dennisdebel 4 years ago
parent
commit
bc0f8ab63d
  1. 10
      website/map/index.php

10
website/map/index.php

@ -12,7 +12,7 @@ $scooters = array(
array('https://platform.tier-services.io/v1/vehicle/00020bdd-ee4c-486a-90f5-dd04672cfc54', 'Martin Howse', 'wok_the_cables', 'Adventure game for psychogeophysical divination of portals, realtime instructions to follow #wokthecables'), array('https://platform.tier-services.io/v1/vehicle/00020bdd-ee4c-486a-90f5-dd04672cfc54', 'Martin Howse', 'wok_the_cables', 'Adventure game for psychogeophysical divination of portals, realtime instructions to follow #wokthecables'),
array('https://platform.tier-services.io/v1/vehicle/acd0c627-5b16-461e-a662-65cef778d94d', 'Sofya Aleynikova', 'followers', 'Eine weibliche Protagonistin manifestiert sich als Meme im Web und stellt die richtigen Fragen.'), array('https://platform.tier-services.io/v1/vehicle/acd0c627-5b16-461e-a662-65cef778d94d', 'Sofya Aleynikova', 'followers', 'Eine weibliche Protagonistin manifestiert sich als Meme im Web und stellt die richtigen Fragen.'),
array('https://platform.tier-services.io/v1/vehicle/7eebb2e6-2694-43a2-b390-d8fc70124377', 'JODI', '#4b38$R0ut.IDx', '██████████████████████████████████████████████████▒▒'), array('https://platform.tier-services.io/v1/vehicle/7eebb2e6-2694-43a2-b390-d8fc70124377', 'JODI', '#4b38$R0ut.IDx', '██████████████████████████████████████████████████▒▒'),
array('https://platform.tier-services.io/v1/vehicle/50e749fc-1ebb-41b0-9de7-952db5c0aa05', 'Rosa Menkmann', 'Ariane', 'Ariane is a famous Shutterstock model. She also worries about getting older.'), array('https://platform.tier-services.io/v1/vehicle/50e749fc-1ebb-41b0-9de7-952db5c0aa05', 'Rosa Menkman', 'Ariane', 'Ariane is a famous Shutterstock model. She also worries about getting older.'),
array('https://platform.tier-services.io/v1/vehicle/30895827-25f1-4c07-8528-25c215e80336', 'Sarah Grant', 'Plague Rave 2020', 'Take a katamari style tour with corona through the vibrant Berlin club scene. Download a souvenir photo at the end of the trip!'), array('https://platform.tier-services.io/v1/vehicle/30895827-25f1-4c07-8528-25c215e80336', 'Sarah Grant', 'Plague Rave 2020', 'Take a katamari style tour with corona through the vibrant Berlin club scene. Download a souvenir photo at the end of the trip!'),
array('https://platform.tier-services.io/v1/vehicle/2de46e02-d816-47eb-9ad8-0ecb4178af25', 'Danja Vasiliev', 'need4speed', 'A situationist game in public space adapted for the micro-mobility sector. Rent a scooter, ride while making continuous and sharp turns and find l00t!'), array('https://platform.tier-services.io/v1/vehicle/2de46e02-d816-47eb-9ad8-0ecb4178af25', 'Danja Vasiliev', 'need4speed', 'A situationist game in public space adapted for the micro-mobility sector. Rent a scooter, ride while making continuous and sharp turns and find l00t!'),
array('https://platform.tier-services.io/v1/vehicle/f42debc7-2dd3-4b64-9956-de96a12d2af9', 'Constant Dullaart', 'constant time', 'Your network, your home, as temporary as seconds on the clock. Reconnect.'), array('https://platform.tier-services.io/v1/vehicle/f42debc7-2dd3-4b64-9956-de96a12d2af9', 'Constant Dullaart', 'constant time', 'Your network, your home, as temporary as seconds on the clock. Reconnect.'),
@ -80,19 +80,19 @@ function makeMarker(int $id){ // generate appropriate markers based on latest JS
//check if scooter is rentable //check if scooter is rentable
if($rnt == true && $act === 'ACTIVE'){ if($rnt == true && $act === 'ACTIVE'){
$marker = 'var scooter'.$id.' = L.marker(['.$pos.'], {time: "'.$lst.'"}).addTo(map) $marker = 'var scooter'.$id.' = L.marker(['.$pos.'], {time: "'.$lst.'"}).addTo(map)
.bindPopup("<b>'.$tit.'</b><br>'.$des.'<br>Last updated: '.$lst=str_replace(array('T', 'Z'), ' ', $lst).'<br>Status: rentable, Gallery available") .bindPopup("<b>'.$tit.'</b><br>'.$des.'<br>Last updated: '.$lst=str_replace(array('T', 'Z'), ' ', $lst).'<br>Status: rentable, gallery online")
.bindTooltip("'.$nam.'").setIcon(availableIcon);'; .bindTooltip("'.$nam.'").setIcon(availableIcon);';
} elseif ($rnt == false && $act === 'ACTIVE') { } elseif ($rnt == false && $act === 'ACTIVE') {
$marker = 'var scooter'.$id.' = L.marker(['.$pos.'], {time: "'.$lst.'"}).addTo(map) $marker = 'var scooter'.$id.' = L.marker(['.$pos.'], {time: "'.$lst.'"}).addTo(map)
.bindPopup("<b>'.$tit.'</b><br>'.$des.'<br>Last updated: '.$lst=str_replace(array('T', 'Z'), ' ', $lst).'<br>Status: rented Out, Gallery unavailable") .bindPopup("<b>'.$tit.'</b><br>'.$des.'<br>Last updated: '.$lst=str_replace(array('T', 'Z'), ' ', $lst).'<br>Status: rented out, gallery on the move")
.bindTooltip("'.$nam.'").setIcon(isRentedIcon);'; .bindTooltip("'.$nam.'").setIcon(isRentedIcon);';
}; };
//check if scooter is in maintenace //check if scooter is in maintenace
if($act !== "ACTIVE"){ if($act !== "ACTIVE"){
$marker = 'var scooter'.$id.' = L.marker(['.$pos.'], {time: "'.$lst.'"}).addTo(map) $marker = 'var scooter'.$id.' = L.marker(['.$pos.'], {time: "'.$lst.'"}).addTo(map)
.bindPopup("<b>'.$tit.'</b><br>'.$des.'<br>Last updated: '.$lst=str_replace(array('T', 'Z'), ' ', $lst).'<br>Status: unavailable, in maintenace") .bindPopup("<b>'.$tit.'</b><br>'.$des.'<br>Last updated: '.$lst=str_replace(array('T', 'Z'), ' ', $lst).'<br>Status: battery low, gallery online")
.bindTooltip("'.$nam.'").setIcon(isMaintenanceIcon);'; .bindTooltip("'.$nam.'").setIcon(isMaintenanceIcon);';
}; };
@ -421,7 +421,7 @@ function callAPI($url){
{"icon": "hourglass-half", "iconColor": "white", "spin": "true", "markerColor": "pink", "prefix": "fa"} {"icon": "hourglass-half", "iconColor": "white", "spin": "true", "markerColor": "pink", "prefix": "fa"}
); );
var isMaintenanceIcon = L.AwesomeMarkers.icon( var isMaintenanceIcon = L.AwesomeMarkers.icon(
{"icon": "wrench", "iconColor": "white", "markerColor": "black", "prefix": "fa"} {"icon": "battery-1", "iconColor": "white", "markerColor": "pink", "prefix": "fa"}
); );

Loading…
Cancel
Save