From 18ce2d5bf1e0aa51d6cf909f044d4d97c493e5e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?kimjh=28=EA=B9=80=EC=9E=A5=ED=98=84=29?= Date: Tue, 22 Nov 2022 14:39:02 +0900 Subject: [PATCH] =?UTF-8?q?=EB=93=9C=EB=A1=A0=20=EA=B4=80=EC=A0=9C=20temin?= =?UTF-8?q?alId=20=EC=97=90=20=EB=94=B0=EB=A5=B8=20=EB=8D=B0=EC=9D=B4?= =?UTF-8?q?=ED=84=B0=EB=B8=94=EB=A1=9D=20=EB=B6=84=EA=B8=B0=20=EC=B2=98?= =?UTF-8?q?=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/map/naver/dron/DronMarker.js | 24 +++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/src/components/map/naver/dron/DronMarker.js b/src/components/map/naver/dron/DronMarker.js index 13e2d556..b1121c33 100644 --- a/src/components/map/naver/dron/DronMarker.js +++ b/src/components/map/naver/dron/DronMarker.js @@ -296,8 +296,9 @@ export const DronMarker = props => { // // document.querySelector('.dblock-box').style.fontSize = `${zoom}px`; // // document.querySelector('.dblock-ti').style.fontSize = `${zoom}px`; // }); - - setArrMarkers(m => [...m, marker]); + if (markerOption.url) { + setArrMarkers(m => [...m, marker]); + } }; const handlerDronClick = (controlId, idntfNum) => { @@ -369,7 +370,14 @@ export const DronMarker = props => {
${item?.elev}M ${item?.speed}km - ${(item?.lat).toFixed(6)} ${(item?.lng).toFixed(6)} + ${ + typeof item?.lat === 'number' && typeof item?.lng === 'number' + ? ` + + ${(item?.lat).toFixed(6)} ${(item?.lng).toFixed(6)} + ` + : '' + }
@@ -451,7 +459,14 @@ export const DronMarker = props => {
${gps?.elev}M ${gps?.speed}km - ${(gps?.lat).toFixed(6)} ${(gps?.lng).toFixed(6)} + ${ + typeof gps?.lat === 'number' && typeof gps?.lng === 'number' + ? ` + + ${(gps?.lat).toFixed(6)} ${(gps?.lng).toFixed(6)} + ` + : '' + }
@@ -568,6 +583,7 @@ export const DronMarker = props => { if (arrInfos.filter(i => i._controlId === marker.controlId).length > 0) { return; } + console.log(controlGpList[idx]); infoInit(marker, controlGpList[idx], idx); if (controlGpList.length != 0) {