|
|
@ -133,20 +133,28 @@ export const DronMarker = props => { |
|
|
|
//마커를 그린다.
|
|
|
|
//마커를 그린다.
|
|
|
|
const addMarkers = (position, id, controlId, gps) => { |
|
|
|
const addMarkers = (position, id, controlId, gps) => { |
|
|
|
const markerOption = {}; |
|
|
|
const markerOption = {}; |
|
|
|
|
|
|
|
console.log(gps, 'gps'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log(id, 'idntfNum'); |
|
|
|
if (id.substring(0, 2) === 'PA') { |
|
|
|
if (id.substring(0, 2) === 'PA') { |
|
|
|
const pal = controlGroupAuthInfo?.find( |
|
|
|
const pal = controlGroupAuthInfo?.find( |
|
|
|
prev => prev.idntfNum === gps.objectId |
|
|
|
prev => prev.idntfNum === gps.objectId |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
console.log(pal, '등록된 식별장치'); |
|
|
|
if (pal) { |
|
|
|
if (pal) { |
|
|
|
|
|
|
|
console.log('맞음'); |
|
|
|
markerOption.url = DronIcon; |
|
|
|
markerOption.url = DronIcon; |
|
|
|
markerOption.type = 'DRONE'; |
|
|
|
markerOption.type = 'DRONE'; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
|
|
|
|
console.log('아님'); |
|
|
|
if (user.authId === 'SUPER' || user.authId === 'ADMIN') { |
|
|
|
if (user.authId === 'SUPER' || user.authId === 'ADMIN') { |
|
|
|
|
|
|
|
console.log('super, admin'); |
|
|
|
markerOption.url = FlightIcon; |
|
|
|
markerOption.url = FlightIcon; |
|
|
|
markerOption.type = 'FLIGHT'; |
|
|
|
markerOption.type = 'FLIGHT'; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
|
|
|
|
console.log('user'); |
|
|
|
const terminal = joinList?.find(prev => prev.trmnlId === gps.trmnlId); |
|
|
|
const terminal = joinList?.find(prev => prev.trmnlId === gps.trmnlId); |
|
|
|
|
|
|
|
console.log(terminal, 'trmnlId 일치 있음'); |
|
|
|
if ( |
|
|
|
if ( |
|
|
|
terminal?.groupAuthCd === 'MASTER' || |
|
|
|
terminal?.groupAuthCd === 'MASTER' || |
|
|
|
terminal?.groupAuthCd === 'LEADER' |
|
|
|
terminal?.groupAuthCd === 'LEADER' |
|
|
|