Name | Type | Description |
---|---|---|
viewer |
DitapViewer | 사용할 Ditap Viewer 인스턴스. The DitapViewer instance to use. |
editObjArray |
Array.<object> | 표시 할 편집 도구 배열. Array containing editing tools to display. |
Example:
// 1. DitapViewer 생성 시 EditToolPicker 생성 가능.
// editingTools에 사용할 편집 도구 작성. 작성된 편집 도구들을 담은 편집 도구 모음 위젯 생성.
// 활성화 - 전체 활성화(editingTools: true) 또는 부분 활성화(활성화 시킬 기능만 true)
// 비활성화 - false 또는 전달 안함
const viewer = new Ditap.DitapViewer("container", {
editingTools: {
select: true,
createTools: {
point: true,
linestring: true,
polygon: true,
},
remove: true,
move: true,
rotate: true,
scale: true,
upload: true,
}
});
// 2. 단독으로 선언하여 활성화
const viewer = new Ditap.DitapViewer("ditapContainer");
// 사용할 도형 생성 도구 모음 초기화
const editCreateObjArray = [
new Ditap.InteractionPointEntity(),
new Ditap.InteractionLinestringEntity(),
new Ditap.InteractionPolygonEntity(),
];
// 생성 도구 모음 생성 (도구 생성 기능 사용할 경우 필수)
const drawingTypePicker = new Ditap.DrawingTypePicker(
viewer,
editCreateObjArray
);
// 사용할 편집 도구 모음 초기화
const editObjArray = [
drawingTypePicker,
new Ditap.InteractionSelect(viewer),
new Ditap.InteractionMove(viewer),
new Ditap.InteractionScale(viewer),
new Ditap.InteractionRotate(viewer),
new Ditap.InteractionRemove(),
new Ditap.PopupInput3D(viewer, new Ditap.Interaction3DPosition())
];
// 편집 도구 모음 생성
const editToolPicker = new Ditap.EditToolPicker(viewer, editObjArray);
Methods
편집 도구 모음 비활성화.
Deactivate the collection of edit tools.
인스턴스 제거.
Destroys the instance.
편집 도구 모음 활성화.
Activate the collection of edit tools.