Browse Source

관제 데이트블록 이슈 수정

ctrlDraw
김장현 2 years ago
parent
commit
0347e828f6
  1. 3
      .gitignore
  2. 21
      src/components/map/naver/dron/DronMarker.js

3
.gitignore vendored

@ -17,6 +17,9 @@
.env.development.local
.env.test.local
.env.production.local
.env
.env.development
.env.production
npm-debug.log*
yarn-debug.log*

21
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);

Loading…
Cancel
Save