|
|
|
@ -115,50 +115,6 @@ export const DronMarker = props => {
|
|
|
|
|
} |
|
|
|
|
}, [isClickObject]); |
|
|
|
|
|
|
|
|
|
// useEffect(() => {
|
|
|
|
|
// let imageUrl;
|
|
|
|
|
// arrMarkers.map(clickMarker => {
|
|
|
|
|
// if (objectId === clickMarker.controlId && isClickObject) {
|
|
|
|
|
// // console.log(clickMarker.gps.objectId, '><><');
|
|
|
|
|
// imageUrl =
|
|
|
|
|
// // clickMarker.type === 'DRONE' ? DronUamDetailIcon : FlightDetailIcon;
|
|
|
|
|
// clickMarker.type === 'DRONE'
|
|
|
|
|
// ? clickMarker.gps.objectId.includes('UAM')
|
|
|
|
|
// ? DronUamDetailIcon
|
|
|
|
|
// : DronDetailIcon
|
|
|
|
|
// : FlightDetailIcon;
|
|
|
|
|
// clickMarker.setIcon({
|
|
|
|
|
// content: `<img src="${imageUrl}" alt="" style="transform: rotate(${clickMarker.gps.heading}deg)">`,
|
|
|
|
|
// origin: new naver.maps.Point(0, 0),
|
|
|
|
|
// anchor: new naver.maps.Point(15, 15)
|
|
|
|
|
// });
|
|
|
|
|
// } else {
|
|
|
|
|
// // imageUrl = clickMarker.type === 'DRONE' ? DronUamIcon : FlightIcon;
|
|
|
|
|
// imageUrl =
|
|
|
|
|
// clickMarker.type === 'DRONE'
|
|
|
|
|
// ? clickMarker.gps.objectId.includes('UAM')
|
|
|
|
|
// ? DronUamIcon
|
|
|
|
|
// : DronIcon
|
|
|
|
|
// : FlightIcon;
|
|
|
|
|
// clickMarker.setIcon({
|
|
|
|
|
// content: `<img src="${imageUrl}" alt="" style="transform: rotate(${clickMarker.gps.heading}deg)">`,
|
|
|
|
|
// origin: new naver.maps.Point(0, 0),
|
|
|
|
|
// anchor: new naver.maps.Point(15, 15)
|
|
|
|
|
// });
|
|
|
|
|
// }
|
|
|
|
|
// });
|
|
|
|
|
// }, [objectId, isClickObject]);
|
|
|
|
|
|
|
|
|
|
// useEffect(() => {
|
|
|
|
|
// arrMarkers.map(clickMarker => {
|
|
|
|
|
// if (objectId === clickMarker.controlId) {
|
|
|
|
|
// dispatch(controlGpDtlAction.request(objectId));
|
|
|
|
|
// props.map.setCenter(clickMarker.getPosition());
|
|
|
|
|
// props.map.setZoom(13, true);
|
|
|
|
|
// }
|
|
|
|
|
// });
|
|
|
|
|
// }, [objectId]);
|
|
|
|
|
|
|
|
|
|
//마커 생성
|
|
|
|
|
const addMarkers = (position, id, controlId, gps) => { |
|
|
|
|
const gpsCnt = { |
|
|
|
@ -228,34 +184,6 @@ export const DronMarker = props => {
|
|
|
|
|
})); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// if (id.substring(0, 2) === 'PA') {
|
|
|
|
|
// const pal = controlGroupAuthInfo?.find(
|
|
|
|
|
// prev => prev.idntfNum === gps.objectId
|
|
|
|
|
// );
|
|
|
|
|
// markerOption.url = pal ? DronIcon : FlightIcon;
|
|
|
|
|
// markerOption.type = pal ? 'DRONE' : 'FLIGHT';
|
|
|
|
|
// } else {
|
|
|
|
|
// markerOption.url = FlightIcon;
|
|
|
|
|
// markerOption.type = 'FLIGHT';
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// markerOption.origin = new naver.maps.Point(0, 0);
|
|
|
|
|
// markerOption.anchor = new naver.maps.Point(15, 15);
|
|
|
|
|
|
|
|
|
|
// const marker = new naver.maps.Marker({
|
|
|
|
|
// position: position,
|
|
|
|
|
// title: id,
|
|
|
|
|
// id: id,
|
|
|
|
|
// controlId: controlId,
|
|
|
|
|
// type: markerOption.type,
|
|
|
|
|
// icon: {
|
|
|
|
|
// content: `<img id=${id} src="${markerOption.url}" alt="" style="transform: rotate(${gps.heading}deg);">`,
|
|
|
|
|
// origin: markerOption.origin,
|
|
|
|
|
// anchor: markerOption.anchor
|
|
|
|
|
// },
|
|
|
|
|
// gps: gps
|
|
|
|
|
// });
|
|
|
|
|
// marker.setMap(props.map);
|
|
|
|
|
const el = document.createElement('img'); |
|
|
|
|
el.id = id; |
|
|
|
|
el.src = markerOption.url; |
|
|
|
@ -405,7 +333,6 @@ export const DronMarker = props => {
|
|
|
|
|
if (controlGpList) { |
|
|
|
|
allRemoveMarkers(); |
|
|
|
|
controlGpList.map((item, idx) => { |
|
|
|
|
// let position = new naver.maps.LatLng(item.lat, item.lng);
|
|
|
|
|
let position = new props.mapboxgl.LngLat(item.lng, item.lat); |
|
|
|
|
|
|
|
|
|
if (arrMarkers.length > 0) { |
|
|
|
|