diff options
author | Anton Tananaev <anton@traccar.org> | 2022-07-20 17:17:34 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-07-20 17:17:34 -0700 |
commit | d9c66515419cfe4df11a5b57dd587e48f2a91f1a (patch) | |
tree | aada4727f205ed65f1eac720ad139dd3b5152c85 /modern/src/map | |
parent | 5aa56563f23ada9ee5298ac6ebf7e35ebcd2820c (diff) | |
download | trackermap-web-d9c66515419cfe4df11a5b57dd587e48f2a91f1a.tar.gz trackermap-web-d9c66515419cfe4df11a5b57dd587e48f2a91f1a.tar.bz2 trackermap-web-d9c66515419cfe4df11a5b57dd587e48f2a91f1a.zip |
Support KML POI lines
Diffstat (limited to 'modern/src/map')
-rw-r--r-- | modern/src/map/main/PoiMap.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/modern/src/map/main/PoiMap.js b/modern/src/map/main/PoiMap.js index a5185c75..e3364ec2 100644 --- a/modern/src/map/main/PoiMap.js +++ b/modern/src/map/main/PoiMap.js @@ -40,6 +40,15 @@ const PoiMap = () => { }); map.addLayer({ source: id, + id: 'poi-line', + type: 'line', + paint: { + 'line-color': theme.palette.colors.geometry, + 'line-width': 2, + }, + }); + map.addLayer({ + source: id, id: 'poi-title', type: 'symbol', layout: { @@ -58,6 +67,9 @@ const PoiMap = () => { if (map.getLayer('poi-point')) { map.removeLayer('poi-point'); } + if (map.getLayer('poi-line')) { + map.removeLayer('poi-line'); + } if (map.getLayer('poi-title')) { map.removeLayer('poi-title'); } |