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

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

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

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

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

Loading…
Cancel
Save