김장현 2 years ago
parent
commit
b270144384
  1. 5
      src/components/map/naver/dron/DronMarker.js
  2. 4
      src/modules/control/gp/sagas/controlGpSaga.ts

5
src/components/map/naver/dron/DronMarker.js

@ -116,12 +116,15 @@ export const DronMarker = props => {
const markerOption = {};
if (id.substring(0, 2) === 'PA') {
const pal = controlGroupAuthInfo.find(
const pal = controlGroupAuthInfo?.find(
prev => prev.idntfNum === gps.objectId
);
markerOption.url = pal ? DronIcon : FlightIcon;
markerOption.type = pal ? 'DRONE' : 'FLIGHT';
} else {
// const etc = controlGpList?.filter(
// prev => prev.command === 이사람이 가입한 그룹의 command(가입한 그룹의 리스트를 여기로 불러와야 함)
// )
markerOption.url = FlightIcon;
markerOption.type = 'FLIGHT';
}

4
src/modules/control/gp/sagas/controlGpSaga.ts

@ -26,7 +26,7 @@ function* getControlGpSaga(
let gpsData: ControlGpData[] = [];
//사용자가 등록한 기체(식별장치 포함)만 관제에서 볼 수 있게 필터처리
if (controlGroupAuthInfo.length > 0) {
if (controlGroupAuthInfo?.length > 0) {
controlGroupAuthInfo.forEach(auth => {
if (gpsData.length > 0) return false;
@ -46,7 +46,7 @@ function* getControlGpSaga(
data.forEach(gps => {
if (gps.controlId && gps.objectId.substring(0, 2) === 'PA') {
const arcrft = controlGroupAuthInfo.find(
const arcrft = controlGroupAuthInfo?.find(
auth => auth.idntfNum === gps.objectId
);

Loading…
Cancel
Save