|
|
@ -424,6 +424,7 @@ export const DronMarker = props => { |
|
|
|
this.setMap(options.map || null); |
|
|
|
this.setMap(options.map || null); |
|
|
|
this.setId(options.id); |
|
|
|
this.setId(options.id); |
|
|
|
this.setIdx(idx); |
|
|
|
this.setIdx(idx); |
|
|
|
|
|
|
|
this.setControlId(options.controlId); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
CustomOverlay.prototype = new naver.maps.OverlayView(); |
|
|
|
CustomOverlay.prototype = new naver.maps.OverlayView(); |
|
|
@ -461,11 +462,6 @@ export const DronMarker = props => { |
|
|
|
this._element.off(); |
|
|
|
this._element.off(); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
CustomOverlay.prototype.setElement = function (element, idx) { |
|
|
|
|
|
|
|
this._element = element; |
|
|
|
|
|
|
|
this.draw(idx); |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//속성
|
|
|
|
//속성
|
|
|
|
CustomOverlay.prototype.setPosition = function (position, idx) { |
|
|
|
CustomOverlay.prototype.setPosition = function (position, idx) { |
|
|
|
this._position = position; |
|
|
|
this._position = position; |
|
|
@ -491,6 +487,14 @@ export const DronMarker = props => { |
|
|
|
CustomOverlay.prototype.getIdx = function () { |
|
|
|
CustomOverlay.prototype.getIdx = function () { |
|
|
|
return this._idx; |
|
|
|
return this._idx; |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CustomOverlay.prototype.setControlId = function (controlId) { |
|
|
|
|
|
|
|
this._controlId = controlId; |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CustomOverlay.prototype.getControlId = function () { |
|
|
|
|
|
|
|
return this._controlId; |
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const removeArrMarkers = arrData => { |
|
|
|
const removeArrMarkers = arrData => { |
|
|
@ -503,9 +507,11 @@ export const DronMarker = props => { |
|
|
|
|
|
|
|
|
|
|
|
const markerInfo = arrMarkers => { |
|
|
|
const markerInfo = arrMarkers => { |
|
|
|
arrMarkers.forEach((marker, idx) => { |
|
|
|
arrMarkers.forEach((marker, idx) => { |
|
|
|
|
|
|
|
if (arrInfos.filter(i => i._controlId === marker.controlId).length > 0) { |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
infoInit(marker, controlGpList[idx], idx); |
|
|
|
infoInit(marker, controlGpList[idx], idx); |
|
|
|
|
|
|
|
|
|
|
|
if (arrInfos.filter(i => i._idx === idx).length > 0) return; |
|
|
|
|
|
|
|
if (controlGpList.length != 0) { |
|
|
|
if (controlGpList.length != 0) { |
|
|
|
const info = new CustomOverlay({ |
|
|
|
const info = new CustomOverlay({ |
|
|
|
position: new naver.maps.LatLng( |
|
|
|
position: new naver.maps.LatLng( |
|
|
@ -514,7 +520,8 @@ export const DronMarker = props => { |
|
|
|
), |
|
|
|
), |
|
|
|
// map: map,
|
|
|
|
// map: map,
|
|
|
|
id: marker.id, |
|
|
|
id: marker.id, |
|
|
|
idx: idx |
|
|
|
idx: idx, |
|
|
|
|
|
|
|
controlId: marker.controlId |
|
|
|
}); |
|
|
|
}); |
|
|
|
info.setMap(map); |
|
|
|
info.setMap(map); |
|
|
|
|
|
|
|
|
|
|
|