aboutsummaryrefslogtreecommitdiff
path: root/modern
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-07-20 17:17:34 -0700
committerAnton Tananaev <anton@traccar.org>2022-07-20 17:17:34 -0700
commitd9c66515419cfe4df11a5b57dd587e48f2a91f1a (patch)
treeaada4727f205ed65f1eac720ad139dd3b5152c85 /modern
parent5aa56563f23ada9ee5298ac6ebf7e35ebcd2820c (diff)
downloadtrackermap-web-d9c66515419cfe4df11a5b57dd587e48f2a91f1a.tar.gz
trackermap-web-d9c66515419cfe4df11a5b57dd587e48f2a91f1a.tar.bz2
trackermap-web-d9c66515419cfe4df11a5b57dd587e48f2a91f1a.zip
Support KML POI lines
Diffstat (limited to 'modern')
-rw-r--r--modern/src/map/main/PoiMap.js12
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');
}