diff --git a/src/components/map/mapbox/MapBoxMap.js b/src/components/map/mapbox/MapBoxMap.js index eb9ad13..b9ac713 100644 --- a/src/components/map/mapbox/MapBoxMap.js +++ b/src/components/map/mapbox/MapBoxMap.js @@ -120,22 +120,23 @@ export default function MapBoxMap() { } ) => { // useGeoJson = mapControl.liner - useGeoJson = mapControl.areaType - ? { - ...geoJson, - ...flatGimpo, - features: [...geoJson.features, ...flatGimpo.features] - } - : { - ...geoJson, - ...gimPoGrid, - features: [...geoJson.features, ...gimPoGrid.features] - }; + useGeoJson = + mapControl.areaType === 'linear' + ? { + ...geoJson, + ...flatGimpo, + features: [...geoJson.features, ...flatGimpo.features] + } + : { + ...geoJson, + ...gimPoGrid, + features: [...geoJson.features, ...gimPoGrid.features] + }; if (map.getLayer('maine')) { map.removeLayer('maine'); map.removeSource('maine'); } - + console.log(mapControl.areaType); if (altitudeMarker.length > 0) { altitudeMarker.map(i => { i.remove();