added fancy icons to curl.php
This commit is contained in:
parent
d2c5948378
commit
c13e456b38
@ -12,11 +12,11 @@ $scooters = array(
|
|||||||
);
|
);
|
||||||
|
|
||||||
//make it like this
|
//make it like this
|
||||||
$scooters = array(
|
//$scooters = array(
|
||||||
//'https://platform.tier-services.io/v1/vehicle/fbd739d6-554f-4eaf-bd9c-afe3d501c94b',
|
|
||||||
'https://opencoil.show/test-json.php?scooterID=1',
|
//'https://opencoil.show/test-json.php?scooterID=1', name of artist, title, desc
|
||||||
'https://opencoil.show/test-json.php?scooterID=2'
|
|
||||||
);
|
//);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -150,11 +150,13 @@ function callAPI($url){
|
|||||||
// prefix: glyphicon = bootstrap, list can be found here: https://getbootstrap.com/docs/3.3/components/
|
// prefix: glyphicon = bootstrap, list can be found here: https://getbootstrap.com/docs/3.3/components/
|
||||||
// prefix: fa = fontawesome, list is here: https://fontawesome.com/v4.7.0/cheatsheet/
|
// prefix: fa = fontawesome, list is here: https://fontawesome.com/v4.7.0/cheatsheet/
|
||||||
var availableIcon = L.AwesomeMarkers.icon(
|
var availableIcon = L.AwesomeMarkers.icon(
|
||||||
{"icon": "remove", "iconColor": "white", "markerColor": "purple", "spin": "true", "prefix": "glyphicon"}
|
{"icon": "wifi", "iconColor": "white", "markerColor": "purple", "spin": "true", "prefix": "fa"}
|
||||||
);
|
);
|
||||||
|
|
||||||
var isRentedIcon = L.AwesomeMarkers.icon(
|
var isRentedIcon = L.AwesomeMarkers.icon(
|
||||||
{"icon": "print", "iconColor": "white", "markerColor": "gray", "prefix": "fa"}
|
{"icon": "hourglass-half", "iconColor": "white", "markerColor": "pink", "prefix": "fa"}
|
||||||
|
);
|
||||||
|
var isMaintenanceIcon = L.AwesomeMarkers.icon(
|
||||||
|
{"icon": "wrench", "iconColor": "white", "markerColor": "black", "prefix": "fa"}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -177,10 +179,30 @@ function callAPI($url){
|
|||||||
.bindTooltip('artist name')
|
.bindTooltip('artist name')
|
||||||
.setIcon(availableIcon); // scooter is available
|
.setIcon(availableIcon); // scooter is available
|
||||||
//.setIcon(isRentedIcon); // scooter is rented
|
//.setIcon(isRentedIcon); // scooter is rented
|
||||||
|
//.setIcon(isMaintenanceIcon); // scooter is rented
|
||||||
//.openPopup();
|
//.openPopup();
|
||||||
|
|
||||||
|
|
||||||
// scooter1.setIcon(icon_7e68fd836a604f9481171759656817aa);
|
var scooter1 = L.marker([52.508926, 13.355061],
|
||||||
|
{time: "2020-10-09T08:00:29Z"},
|
||||||
|
{icon: availableIcon}).addTo(map)
|
||||||
|
.bindPopup('Last updated <?php echo $lst; ?>')
|
||||||
|
.bindTooltip('artist name')
|
||||||
|
//.setIcon(availableIcon); // scooter is available
|
||||||
|
.setIcon(isRentedIcon); // scooter is rented
|
||||||
|
//.setIcon(isMaintenanceIcon); // scooter is rented
|
||||||
|
//.openPopup();
|
||||||
|
|
||||||
|
|
||||||
|
var scooter1 = L.marker([52.506926, 13.348061],
|
||||||
|
{time: "2020-10-09T08:00:29Z"},
|
||||||
|
{icon: availableIcon}).addTo(map)
|
||||||
|
.bindPopup('Last updated <?php echo $lst; ?>')
|
||||||
|
.bindTooltip('artist name')
|
||||||
|
//.setIcon(availableIcon); // scooter is available
|
||||||
|
//.setIcon(isRentedIcon); // scooter is rented
|
||||||
|
.setIcon(isMaintenanceIcon); // scooter is rented
|
||||||
|
//.openPopup();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user