diff --git a/.gitignore b/.gitignore index f3e32945..ad3df548 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,9 @@ .env.development.local .env.test.local .env.production.local +.env +.env.development +.env.production npm-debug.log* yarn-debug.log* diff --git a/src/components/map/naver/dron/DronMarker.js b/src/components/map/naver/dron/DronMarker.js index 02dee5fd..d762197b 100644 --- a/src/components/map/naver/dron/DronMarker.js +++ b/src/components/map/naver/dron/DronMarker.js @@ -424,6 +424,7 @@ export const DronMarker = props => { this.setMap(options.map || null); this.setId(options.id); this.setIdx(idx); + this.setControlId(options.controlId); }; CustomOverlay.prototype = new naver.maps.OverlayView(); @@ -461,11 +462,6 @@ export const DronMarker = props => { this._element.off(); }; - CustomOverlay.prototype.setElement = function (element, idx) { - this._element = element; - this.draw(idx); - }; - //속성 CustomOverlay.prototype.setPosition = function (position, idx) { this._position = position; @@ -491,6 +487,14 @@ export const DronMarker = props => { CustomOverlay.prototype.getIdx = function () { return this._idx; }; + + CustomOverlay.prototype.setControlId = function (controlId) { + this._controlId = controlId; + }; + + CustomOverlay.prototype.getControlId = function () { + return this._controlId; + }; }; const removeArrMarkers = arrData => { @@ -503,9 +507,11 @@ export const DronMarker = props => { const markerInfo = arrMarkers => { arrMarkers.forEach((marker, idx) => { + if (arrInfos.filter(i => i._controlId === marker.controlId).length > 0) { + return; + } infoInit(marker, controlGpList[idx], idx); - if (arrInfos.filter(i => i._idx === idx).length > 0) return; if (controlGpList.length != 0) { const info = new CustomOverlay({ position: new naver.maps.LatLng( @@ -514,7 +520,8 @@ export const DronMarker = props => { ), // map: map, id: marker.id, - idx: idx + idx: idx, + controlId: marker.controlId }); info.setMap(map);