From d9c66515419cfe4df11a5b57dd587e48f2a91f1a Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Wed, 20 Jul 2022 17:17:34 -0700 Subject: Support KML POI lines --- modern/src/map/main/PoiMap.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'modern') 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 @@ -38,6 +38,15 @@ const PoiMap = () => { 'circle-color': theme.palette.colors.geometry, }, }); + 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', @@ -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'); } -- cgit v1.2.3