InteractionSlope

경사도 분석을 위한 사용자 입력(마우스/키보드) 클래스.
User input class for slope analysis using mouse/keyboard input.

new Ditap.InteractionSlope(viewer, options)

Name Type Description
viewer Cesium.Viewer Cesium Viewer 인스턴스.
Cesium Viewer instance.
options Object optional 옵션.
Options.
Name Type Default Description
type string 'point' optional 영역 지정 방법 ('point' 또는 'area').
Area specification method ('point' or 'area').
analysisSlope AnalysisSlope null optional 경사도 분석 클래스.
Slope analysis class.
areaValue number 10000 optional 분석 영역 크기(제곱미터).
Analysis area size in square meters.
offCallback function null optional 분석 완료 시 콜백 함수.
Callback function when analysis is complete.
cancelCallback function null optional 취소 시 콜백 함수.
Callback function when cancel.
Example:
// 샌드캐슬 예제 'DiTAP - Slope' 참조
  
const getUrlFromBase64 = (base64Data) => {
  const b64Data = base64Data;
  const byteCharacters = window.atob(b64Data);
  const byteNumbers = new Array(byteCharacters.length);
  for (let i = 0; i < byteCharacters.length; i++) {
    byteNumbers[i] = byteCharacters.charCodeAt(i);
  }
  const byteArray = new Uint8Array(byteNumbers);
  const blob = new Blob([byteArray], { type: "image/png" });

  return URL.createObjectURL(blob);
};

const viewer = new Ditap.DitapViewer("ditapContainer", {
  fullscreenButton: true,
  baseLayerPicker: true,
  // 지형(터레인 지정)
  // 디폴트 지형 : Ditap Korea Terrain
  terrainProviderViewModels: [
    new Ditap.ProviderViewModel({
      name: "Ditap Korea Terrain",
      iconUrl: getUrlFromBase64(Ditap.ConstantUrl.DITAP_TERRAIN_IMG_URL),
      tooltip: "WGS84 standard ellipsoid, also known as EPSG:4326",
      category: "Ditap",
      creationFunction: () => {
        return Ditap.NationwideTerrainProvider.create();
      },
    }),
  ],
});
// 경사도 분석 팝업 생성
const PopupAnalysisSlope = new Ditap.PopupAnalysisSlope(viewer);

// 경사도 분석 팝업 실행
PopupAnalysisSlope.open();

Members

analysisSlope : AnalysisSlope

경사도 엔티티 표시 인스턴스.
Set the slope analysis entity display instance.

readonly areaValue : number

분석 영역 크기.
analysis area size.

readonly isOn : boolean

핸들러 비/활성화 상태.
Handler enabled or disabled.

type

영역 지정 방법 설정("point", "area").
Set the area specification method.

Methods

destroy()

인스턴스 파괴.
Destroy the instance.

off()

경사도 분석 핸들러 종료.
End the slope analysis handler.

on()

경사도 분석 핸들러 활성화.
Activate the slope analysis handler.