new UDraw(options)
| Name | Type | Default | Description |
|---|---|---|---|
options |
UDraw~UDrawCO | {} | optional |
Example
var draw = new GeOnDT.UDraw();
draw.setApp(app); // GeOnDT.U3dAPP 인스턴스 설정
draw.active();
draw.setGeometryType('Point');
Members
-
clickClicknumber
-
-
drawFeatureOLFeature
-
-
drawStyleOLStyle
-
-
eventIdUDraw~EventIdMap
-
-
geometryTypestring
-
-
isActiveboolean
-
-
labelstring UDraw~LabelFn undefined
-
-
labelGroupUGroup
-
-
labelPositionstring
-
-
-
nodeLabelstring UDraw~LabelFn undefined
-
-
nodeLabelGroupUGroup
-
-
sourceUDraw~OLVectorSource
-
-
statestring
-
-
styleOLStyle
-
-
wgs84FeatureOLFeature
-
-
wgs84SourceUDraw~OLVectorSource
-
외부 노출용 EPSG:4326 Source
Methods
-
active()
-
그리기 모듈 활성화 함수
클릭, 더블클릭 이벤트 리스너를 등록한다. -
addFeature(feature)
-
Feature 추가 함수 Feature의 좌표계는 EPSG:4326을 사용해야한다.
Name Type Description featureOLFeature 추가할 Feature
-
clear()
-
그려진 모든 Feature를 제거하는 함수.
-
deactive()
-
그리기 모듈 비활성화 함수
클릭, 더블클릭 이벤트 리스너를 삭제한다. 이미 그려진Feature는 지워지지 않는다. -
dispose()
-
UDraw dispose 함수
-
editLabel(feature, text)
-
Feature의 라벨을 수정하는 함수
Name Type Description featureOLFeature 라벨을 지정할 Feature
textstring 라벨 Text
-
finish()
-
draw 작업 종료 함수
-
getClickCount()number
-
화면 클릭 횟수를 반환하는 함수 (더블클릭 이벤트 발생 시 0으로 초기화)
Returns:
Type Description number 클릭 횟수 -
getFeatureById(id)OLFeature|undefined
-
입력한 ID를 갖는 Feature를 반환하는 함수.
Name Type Description idstring Feature id (그리기 Feature id는 내부적으로 설정된다.)
Returns:
Type Description OLFeature | undefined -
getFeatures()Array.<OLFeature>
-
그려진 모든 Feature 목록을 반환하는 함수.
Returns:
Type Description Array.<OLFeature> -
makeFeature(geos, type)OLFeature
-
Feature 생성 함수 Feature의 좌표계는 EPSG:4326을 사용해야한다.
Name Type Description geosArray.<number> 새로 생성할 Feature의 좌표
typestring Feature의 Geometry 종류
POINTLINESTRINGPOLYGONReturns:
Type Description OLFeature -
makeRawFeature(geos, type, buffersize)OLFeature
-
Name Type Description geosArray.<number> | Array.<Array.<number>> typestring buffersizenumber optional Returns:
Type Description OLFeature -
off(event, listener)
-
이벤트 리스너 제거함수 (
start,change,end이벤트 지원)Name Type Description eventstring listenerfunction -
on(event, listener)string|null
-
이벤트 리스너 등록함수 (
start,change,end이벤트 지원)Name Type Description eventstring listenerEventCallBack Returns:
Type Description string | null -
removeFeature(feature)
-
입력한 Feature를 지도에서 제거하는 함수.
Name Type Description featureOLFeature 제거할 대상 Feature
-
removeLabel(feature)
-
입력한 피쳐의 도형 중앙에 표시되는 라벨을 제거하는 함수
Name Type Description featureOLFeature 피쳐객체
-
removeNodeLabel(feature)
-
입력한 피쳐의 도형 노드에 표시되는 라벨을 제거하는 함수
Name Type Description featureOLFeature 피쳐객체
-
setApp(app)
-
app에 UDraw를 설정하는 함수
Name Type Description appU3dApp APP
-
setDrawStyle(drawStyle)
-
UDraw draw 스타일을 설정하는 함수
Name Type Description drawStyleOLStyle 스타일 (ol.style.Style)
-
setGeometryType(type)
-
그릴 Feature의 Geometry 종류를 설정하는 함수
Name Type Description typestring PointLineStringPolygon -
setStyle(style)
-
UDraw 스타일을 설정하는 함수
Name Type Description styleOLStyle 스타일 (ol.style.Style)
Type Definitions
-
GeoPointobject
-
클릭 이벤트로부터 변환된 지리 좌표
Properties:
Name Type Argument Description xnumber 경도(lon)
ynumber 위도(lat)
znumber <optional>
고도
-
LabelFn()
-
라벨 생성 함수 시그니처
-
OLVectorSourceobject
-
OpenLayers Vector Source 인터페이스 (ol 패키지 타입 미설치 환경 대응)
Properties:
Name Type Description addFeaturefunction Feature 추가
removeFeaturefunction Feature 제거
getFeaturesfunction 모든 Feature 반환
getFeatureByIdfunction ID로 Feature 검색
clearfunction 모든 Feature 제거
-
UDrawCOobject
-
~extends UEventDispatcher~UEventDispatcherCO
UDraw 생성자 옵션Properties:
Name Type Argument Description labelstring | UDraw~LabelFn <optional>
라벨 텍스트 또는 라벨 생성 함수
nodeLabelstring | UDraw~LabelFn <optional>
노드 라벨 텍스트 또는 라벨 생성 함수
styleOLStyle <optional>
스타일 (ol.style.Style)
drawStyleOLStyle <optional>
그리기 스타일 (ol.style.Style)