Browse Source

[허용고도 알림정보] 토글 -> 버튼그룹 변경

pull/1/head
junh_eee(이준희) 9 months ago
parent
commit
f6e6664799
  1. 9
      src/components/map/mapbox/MapBoxMap.js
  2. 12
      src/modules/control/map/reducers/controlMapReducer.ts
  3. 12
      src/views/control/setting/ControlSetting.js

9
src/components/map/mapbox/MapBoxMap.js

@ -106,7 +106,8 @@ export default function MapBoxMap() {
mapControl.area0004,
mapControl.area0005,
mapControl.area0006,
mapControl.liner
// mapControl.liner
mapControl.areaType
]);
// 공역 생성
@ -118,7 +119,8 @@ export default function MapBoxMap() {
features: [...geoJson.features, ...flatGimpo.features]
}
) => {
useGeoJson = mapControl.liner
// useGeoJson = mapControl.liner
useGeoJson = mapControl.areaType
? {
...geoJson,
...flatGimpo,
@ -144,7 +146,8 @@ export default function MapBoxMap() {
linerAltitudeMarker.map(i => i.remove());
}
if (!mapControl.liner) {
// if (!mapControl.liner) {
if (mapControl.areaType === 'square') {
if (gridCoords.length <= 0) {
gimPoGrid.features.map(air => {
gridCoords.push({

12
src/modules/control/map/reducers/controlMapReducer.ts

@ -10,7 +10,8 @@ const initialState = {
area0004: true, // 비행장(군사)
area0005: true, // 이착륙장(RC비행장)
area0006: true, // 초경량비행장치
liner: true,
// liner: true,
areaType: 'linear',
sensor: 'dust',
isLaanc: false,
drawType: null,
@ -62,10 +63,15 @@ const controlReducerReducer = (state = initialState, action) => {
...state,
area0006: !state.area0006
};
} else if (action.value === 'liner') {
} else if (action.value === 'square') {
return {
...state,
liner: !state.liner
areaType: action.value
};
} else if (action.value === 'linear') {
return {
...state,
areaType: action.value
};
} else {
return {

12
src/views/control/setting/ControlSetting.js

@ -78,16 +78,16 @@ const ControlSetting = props => {
<div className='map-btn'>
<ButtonGroup>
<Button
color={mapControl.mapType === 'TERRAIN' ? 'primary' : ''}
// onClick={e => handlerMapType('TERRAIN')}
color={mapControl.areaType === 'linear' ? 'primary' : ''}
onClick={e => handlerAreaClick('linear')}
>
격자
선형
</Button>
<Button
color={mapControl.mapType === 'NORMAL' ? 'primary' : ''}
// onClick={e => handlerMapType('NORMAL')}
color={mapControl.areaType === 'square' ? 'primary' : ''}
onClick={e => handlerAreaClick('square')}
>
선형
격자
</Button>
</ButtonGroup>
</div>

Loading…
Cancel
Save