From c13e456b388c748fc0d67e04c64c5abf4120065f Mon Sep 17 00:00:00 2001 From: user Date: Tue, 13 Oct 2020 17:39:38 +0200 Subject: [PATCH] added fancy icons to curl.php --- website/curl.php | 40 +++++++++++++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 9 deletions(-) diff --git a/website/curl.php b/website/curl.php index 9868c79..d790b1d 100644 --- a/website/curl.php +++ b/website/curl.php @@ -12,11 +12,11 @@ $scooters = array( ); //make it like this -$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=2' -); +//$scooters = array( + +//'https://opencoil.show/test-json.php?scooterID=1', name of artist, title, desc + +//); @@ -150,11 +150,13 @@ function callAPI($url){ // 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/ 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( - {"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') .setIcon(availableIcon); // scooter is available //.setIcon(isRentedIcon); // scooter is rented + //.setIcon(isMaintenanceIcon); // scooter is rented + //.openPopup(); + + + var scooter1 = L.marker([52.508926, 13.355061], + {time: "2020-10-09T08:00:29Z"}, + {icon: availableIcon}).addTo(map) + .bindPopup('Last updated ') + .bindTooltip('artist name') + //.setIcon(availableIcon); // scooter is available + .setIcon(isRentedIcon); // scooter is rented + //.setIcon(isMaintenanceIcon); // scooter is rented //.openPopup(); - // scooter1.setIcon(icon_7e68fd836a604f9481171759656817aa); + var scooter1 = L.marker([52.506926, 13.348061], + {time: "2020-10-09T08:00:29Z"}, + {icon: availableIcon}).addTo(map) + .bindPopup('Last updated ') + .bindTooltip('artist name') + //.setIcon(availableIcon); // scooter is available + //.setIcon(isRentedIcon); // scooter is rented + .setIcon(isMaintenanceIcon); // scooter is rented + //.openPopup();