|
|
|
@ -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(); |
|
|
|
|