|
|
@ -476,96 +476,182 @@ export const flightlayerBuffer = source => { |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
// 비행구역 상세맵 draw 정보 셋팅
|
|
|
|
// 비행구역 상세맵 draw 정보 셋팅
|
|
|
|
export const getDraw = () => |
|
|
|
export const getDraw = mode => { |
|
|
|
new MapboxDraw({ |
|
|
|
if (mode === 'laanc') { |
|
|
|
displayControlsDefault: false, |
|
|
|
return new MapboxDraw({ |
|
|
|
userProperties: true, |
|
|
|
displayControlsDefault: false, |
|
|
|
boxSelect: false, |
|
|
|
userProperties: true, |
|
|
|
modes: { |
|
|
|
boxSelect: false, |
|
|
|
...MapboxDraw.modes, |
|
|
|
modes: { |
|
|
|
draw_circle: CircleMode, |
|
|
|
...MapboxDraw.modes, |
|
|
|
drag_circle: DragCircleMode, |
|
|
|
draw_circle: CircleMode, |
|
|
|
direct_select: DirectMode, |
|
|
|
drag_circle: DragCircleMode, |
|
|
|
simple_select: SimpleSelectMode |
|
|
|
direct_select: DirectMode, |
|
|
|
}, |
|
|
|
simple_select: SimpleSelectMode |
|
|
|
styles: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
// polyline
|
|
|
|
|
|
|
|
id: 'gl-draw-line', |
|
|
|
|
|
|
|
type: 'line', |
|
|
|
|
|
|
|
filter: [ |
|
|
|
|
|
|
|
'all', |
|
|
|
|
|
|
|
['==', '$type', 'LineString'], |
|
|
|
|
|
|
|
['!=', 'mode', 'static'] |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
layout: { |
|
|
|
|
|
|
|
'line-cap': 'round', |
|
|
|
|
|
|
|
'line-join': 'round' |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
paint: { |
|
|
|
|
|
|
|
'line-color': '#8a1c05', |
|
|
|
|
|
|
|
'line-dasharray': [0.2, 2], |
|
|
|
|
|
|
|
'line-width': 2 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
// polygon fill
|
|
|
|
|
|
|
|
id: 'gl-draw-polygon-fill', |
|
|
|
|
|
|
|
type: 'fill', |
|
|
|
|
|
|
|
filter: ['all', ['==', '$type', 'Polygon'], ['!=', 'mode', 'static']], |
|
|
|
|
|
|
|
paint: { |
|
|
|
|
|
|
|
'fill-color': '#8a1c05', |
|
|
|
|
|
|
|
'fill-outline-color': '#8a1c05', |
|
|
|
|
|
|
|
'fill-opacity': 0.1 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
// polygon outline
|
|
|
|
styles: [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
id: 'gl-draw-polygon-stroke-active', |
|
|
|
// polyline
|
|
|
|
type: 'line', |
|
|
|
id: 'gl-draw-line', |
|
|
|
filter: ['all', ['==', '$type', 'Polygon'], ['!=', 'mode', 'static']], |
|
|
|
type: 'line', |
|
|
|
layout: { |
|
|
|
filter: [ |
|
|
|
'line-cap': 'round', |
|
|
|
'all', |
|
|
|
'line-join': 'round' |
|
|
|
['==', '$type', 'LineString'], |
|
|
|
|
|
|
|
['!=', 'mode', 'static'] |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
layout: { |
|
|
|
|
|
|
|
'line-cap': 'round', |
|
|
|
|
|
|
|
'line-join': 'round' |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
paint: { |
|
|
|
|
|
|
|
'line-color': '#8a1c05', |
|
|
|
|
|
|
|
'line-dasharray': [0.2, 2], |
|
|
|
|
|
|
|
'line-width': 2 |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
paint: { |
|
|
|
{ |
|
|
|
'line-color': '#8a1c05', |
|
|
|
// polygon fill
|
|
|
|
'line-dasharray': [0.2, 2], |
|
|
|
id: 'gl-draw-polygon-fill', |
|
|
|
'line-width': 2 |
|
|
|
type: 'fill', |
|
|
|
} |
|
|
|
filter: ['all', ['==', '$type', 'Polygon'], ['!=', 'mode', 'static']], |
|
|
|
}, |
|
|
|
paint: { |
|
|
|
{ |
|
|
|
'fill-color': '#8a1c05', |
|
|
|
// vertex point halos
|
|
|
|
'fill-outline-color': '#8a1c05', |
|
|
|
id: 'gl-draw-polygon-and-line-vertex-halo-active', |
|
|
|
'fill-opacity': 0.1 |
|
|
|
type: 'circle', |
|
|
|
} |
|
|
|
filter: [ |
|
|
|
}, |
|
|
|
'all', |
|
|
|
// polygon outline
|
|
|
|
['==', 'meta', 'vertex'], |
|
|
|
{ |
|
|
|
['==', '$type', 'Point'], |
|
|
|
id: 'gl-draw-polygon-stroke-active', |
|
|
|
['!=', 'mode', 'static'] |
|
|
|
type: 'line', |
|
|
|
], |
|
|
|
filter: ['all', ['==', '$type', 'Polygon'], ['!=', 'mode', 'static']], |
|
|
|
paint: { |
|
|
|
layout: { |
|
|
|
'circle-radius': 8, |
|
|
|
'line-cap': 'round', |
|
|
|
'circle-color': '#ffffff' |
|
|
|
'line-join': 'round' |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
paint: { |
|
|
|
|
|
|
|
'line-color': '#8a1c05', |
|
|
|
|
|
|
|
'line-dasharray': [0.2, 2], |
|
|
|
|
|
|
|
'line-width': 2 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
// vertex point halos
|
|
|
|
|
|
|
|
id: 'gl-draw-polygon-and-line-vertex-halo-active', |
|
|
|
|
|
|
|
type: 'circle', |
|
|
|
|
|
|
|
filter: [ |
|
|
|
|
|
|
|
'all', |
|
|
|
|
|
|
|
['==', 'meta', 'vertex'], |
|
|
|
|
|
|
|
['==', '$type', 'Point'], |
|
|
|
|
|
|
|
['!=', 'mode', 'static'] |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
paint: { |
|
|
|
|
|
|
|
'circle-radius': 8, |
|
|
|
|
|
|
|
'circle-color': '#ffffff' |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
// vertex points
|
|
|
|
|
|
|
|
id: 'gl-draw-polygon-and-line-vertex-active', |
|
|
|
|
|
|
|
type: 'circle', |
|
|
|
|
|
|
|
filter: [ |
|
|
|
|
|
|
|
'all', |
|
|
|
|
|
|
|
['==', 'meta', 'vertex'], |
|
|
|
|
|
|
|
['==', '$type', 'Point'], |
|
|
|
|
|
|
|
['!=', 'mode', 'static'] |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
paint: { |
|
|
|
|
|
|
|
'circle-radius': 6, |
|
|
|
|
|
|
|
'circle-color': '#8a1c05' |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
return new MapboxDraw({ |
|
|
|
|
|
|
|
displayControlsDefault: false, |
|
|
|
|
|
|
|
userProperties: true, |
|
|
|
|
|
|
|
boxSelect: false, |
|
|
|
|
|
|
|
modes: { |
|
|
|
|
|
|
|
...MapboxDraw.modes, |
|
|
|
|
|
|
|
draw_circle: CircleMode, |
|
|
|
|
|
|
|
drag_circle: DragCircleMode, |
|
|
|
|
|
|
|
direct_select: DirectMode, |
|
|
|
|
|
|
|
simple_select: SimpleSelectMode |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
styles: [ |
|
|
|
// vertex points
|
|
|
|
{ |
|
|
|
id: 'gl-draw-polygon-and-line-vertex-active', |
|
|
|
// polyline
|
|
|
|
type: 'circle', |
|
|
|
id: 'gl-draw-line', |
|
|
|
filter: [ |
|
|
|
type: 'line', |
|
|
|
'all', |
|
|
|
filter: [ |
|
|
|
['==', 'meta', 'vertex'], |
|
|
|
'all', |
|
|
|
['==', '$type', 'Point'], |
|
|
|
['==', '$type', 'LineString'], |
|
|
|
['!=', 'mode', 'static'] |
|
|
|
['!=', 'mode', 'static'] |
|
|
|
], |
|
|
|
], |
|
|
|
paint: { |
|
|
|
layout: { |
|
|
|
'circle-radius': 6, |
|
|
|
'line-cap': 'round', |
|
|
|
'circle-color': '#8a1c05' |
|
|
|
'line-join': 'round' |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
paint: { |
|
|
|
|
|
|
|
'line-color': '#8a1c05', |
|
|
|
|
|
|
|
'line-width': 2 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
// polygon fill
|
|
|
|
|
|
|
|
id: 'gl-draw-polygon-fill', |
|
|
|
|
|
|
|
type: 'fill', |
|
|
|
|
|
|
|
filter: ['all', ['==', '$type', 'Polygon'], ['!=', 'mode', 'static']], |
|
|
|
|
|
|
|
paint: { |
|
|
|
|
|
|
|
'fill-color': '#8a1c05', |
|
|
|
|
|
|
|
'fill-outline-color': '#8a1c05', |
|
|
|
|
|
|
|
'fill-opacity': 0.1 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// polygon outline
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
id: 'gl-draw-polygon-stroke-active', |
|
|
|
|
|
|
|
type: 'line', |
|
|
|
|
|
|
|
filter: ['all', ['==', '$type', 'Polygon'], ['!=', 'mode', 'static']], |
|
|
|
|
|
|
|
layout: { |
|
|
|
|
|
|
|
'line-cap': 'round', |
|
|
|
|
|
|
|
'line-join': 'round' |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
paint: { |
|
|
|
|
|
|
|
'line-color': '#8a1c05', |
|
|
|
|
|
|
|
'line-dasharray': [0.2, 2], |
|
|
|
|
|
|
|
'line-width': 2 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
// vertex point halos
|
|
|
|
|
|
|
|
id: 'gl-draw-polygon-and-line-vertex-halo-active', |
|
|
|
|
|
|
|
type: 'circle', |
|
|
|
|
|
|
|
filter: [ |
|
|
|
|
|
|
|
'all', |
|
|
|
|
|
|
|
['==', 'meta', 'vertex'], |
|
|
|
|
|
|
|
['==', '$type', 'Point'], |
|
|
|
|
|
|
|
['!=', 'mode', 'static'] |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
paint: { |
|
|
|
|
|
|
|
'circle-radius': 8, |
|
|
|
|
|
|
|
'circle-color': '#ffffff' |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
// vertex points
|
|
|
|
|
|
|
|
id: 'gl-draw-polygon-and-line-vertex-active', |
|
|
|
|
|
|
|
type: 'circle', |
|
|
|
|
|
|
|
paint: { |
|
|
|
|
|
|
|
'circle-radius': 6, |
|
|
|
|
|
|
|
'circle-color': '#8a1c05' |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
] |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 그리기모드 셋팅 |
|
|
|
* 그리기모드 셋팅 |
|
|
|