Class: uGisDrawFeature

ugmp.control.uGisDrawFeature

new ugmp.control.uGisDrawFeature(opt_options)

피처 그리기 객체.

마우스로 다양한 도형을 그리는 컨트롤 객체.

Name Type Description
opt_options Object
Name Type Description
uGisMap ugmp.uGisMap

ugmp.uGisMap 객체.

useDragPan Boolean

지도 이동 사용 여부. Default is false.

cursorCssName String

마우스 커서 CSS Class Name.

activeChangeListener function

컨트롤의 상태 변경 CallBack.

useSnap Boolean

스냅 사용 여부. Default is false.

drawType String

피처 타입 . Default is LineString.

useDrawEndDisplay Boolean

피처를 그린 후 해당 피처 Display 여부. Default is true.

featureStyle ol.style.Style

피처 스타일.

drawingStyle ol.style.Style

drawing 피처 스타일.

freehand Boolean

자유 그리기 사용 여부. Default is false.

Example
var ugDrawFeature = new ugmp.control.uGisDrawFeature( {
	uGisMap : new ugmp.uGisMap({...}),
	useSnap : true,
	freehand : false,
	useDragPan : true,
	drawType : 'Polygon',
	cursorCssName : 'cursor-polygon',
	useDrawEndDisplay : true,
	activeChangeListener : function(state_) {
		console.log( state_ );
	},
	featureStyle : new ol.style.Style({...}),
	drawingStyle : new ol.style.Style({...})
} );

Subclasses

Extends

Methods

그려진 도형을 지운다.

destroy(clearFeature)

컨트롤을 초기화한다.

Name Type Description
clearFeature Boolean

그려진 도형 제거 여부.

Interaction 활성화 상태를 가져온다.

Returns:
Interaction 활성화 상태.

컨트롤 키를 가져온다.

Returns:
getControlKey 컨트롤 키.

getFeatures(){Array.<ol.Feature>}

피쳐를 가져온다.

Returns:
features Features.

inherited getInteraction(){ol.interaction.Interaction}

Interaction을 가져온다.

Returns:
interaction Draw Interaction.

getLayer(){ol.layer.Vector}

레이어를 가져온다.

Returns:
vectorLayer Vector Layer.

removeFeature(feature)

피처를 제거한다.

Name Type Description
feature ol.Feature

제거할 피처.

Interaction 활성화를 설정한다.

Name Type Description
state Boolean

활성화 여부.

inherited setActiveChangeListener(activeChangeListener)

컨트롤의 상태 변경 CallBack.

Name Type Description
activeChangeListener function

컨트롤의 상태 변경 CallBack.