diff options
author | Iván Ávalos <avalos@disroot.org> | 2021-12-07 17:19:27 -0600 |
---|---|---|
committer | Iván Ávalos <avalos@disroot.org> | 2021-12-07 17:19:27 -0600 |
commit | d79760dbc28d642b8b53f4cdae411fa9375a737a (patch) | |
tree | 9bd878e2900bcb096f0f493a3c39a67d5704eca4 /modern/src/map/PositionsMap.js | |
parent | bbe3e712ef0c616418057f1b9916984da18e7b38 (diff) | |
download | etbsa-traccar-web-d79760dbc28d642b8b53f4cdae411fa9375a737a.tar.gz etbsa-traccar-web-d79760dbc28d642b8b53f4cdae411fa9375a737a.tar.bz2 etbsa-traccar-web-d79760dbc28d642b8b53f4cdae411fa9375a737a.zip |
Collapse sidebar only below XS, marker labels colored according to device status and fixed loading of some marker images
Diffstat (limited to 'modern/src/map/PositionsMap.js')
-rw-r--r-- | modern/src/map/PositionsMap.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modern/src/map/PositionsMap.js b/modern/src/map/PositionsMap.js index f1ac3b7..b53cbfb 100644 --- a/modern/src/map/PositionsMap.js +++ b/modern/src/map/PositionsMap.js @@ -104,7 +104,7 @@ const PositionsMap = ({ positions }) => { source: id, filter: ['!', ['has', 'point_count']], layout: { - 'icon-image': '{category}-map', + 'icon-image': ['concat', ['downcase', ['get', 'category']], '-map'], 'icon-allow-overlap': true, 'text-field': '{name}', 'text-allow-overlap': true, @@ -114,6 +114,7 @@ const PositionsMap = ({ positions }) => { 'text-size': 12, }, paint: { + 'text-color': {type: 'identity', property: 'color'}, 'text-halo-color': 'white', 'text-halo-width': 1, }, |