Created
March 1, 2018 10:38
-
-
Save Terny22/ff18d0c8d1e10c568416920ee8016847 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Custom Label example: | |
<div style="position: relative; white-space: nowrap; text-align: center; font-size: 14px; top: 5px;"> | |
<span style="border: 2px solid #000; border-radius: 10px; color: #000; background-color: #fff; padding-left: 5px; padding-right: 5px; padding-top: 3px; padding-bottom: 3px;">${entityName}</span> | |
</div> | |
Color function example: | |
var status = dsData[dsIndex]['status']; | |
if (status == 'On route') { | |
return "#1976d2"; | |
} else if (status == 'At the stop') { | |
return "green"; | |
} | |
Marker image fanction example: | |
var status = dsData[dsIndex]['status']; | |
var res = { size: 70 }; | |
if (status == 'On route') { | |
res.url = images[0]; | |
} else if (status == 'At the stop') { | |
res.url = images[1]; | |
} | |
return res; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Custom Label example:
Color function example:
var status = dsData[dsIndex]['status'];
if (status == 'On route') {
return "#1976d2";
} else if (status == 'At the stop') {
return "green";
}
Marker image fanction example:
var status = dsData[dsIndex]['status'];
var res = { size: 70 };
if (status == 'On route') {
res.url = images[0];
} else if (status == 'At the stop') {
res.url = images[1];
}
return res;