Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
viewOption |
Object |
횡단면 분석 옵션. Cross-section analysis options.
|
Example:
// 샌드캐슬 예제 'DiTAP - CrossSection' 참조
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", {
baseLayerPicker: true,
// 지형(터레인 지정)
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: function () {
return Ditap.NationwideTerrainProvider.create();
},
}),
],
});
// 뷰어에 추가할 데이터 생성
// 모델 위치로 카메라 이동
viewer.camera.flyTo({
destination: Ditap.Cartesian3.fromDegrees(126.97968, 37.56363, 700),
duration: 1,
orientation: {
heading: Ditap.Math.toRadians(0),
pitch: Ditap.Math.toRadians(-50),
roll: 0,
},
});
// PopupAnalysisCrossSection 생성
const popup = new Ditap.PopupAnalysisCrossSection(viewer);
popup.open();
Members
crossSectionPositions : Array.<Array.<Cartesian3>>
생성된 횡단면 선분 Cartesian 배열의 배열.
Array of Cartesian arrays for the created cross-section lines.
종단면의 전체 길이.
Total length of the longitudinal section.
longitudinalPositions : Array.<Cartesian3>
종단면 기준선 Cartesian 배열.
Cartesian array for the longitudinal baseline.
횡단면의 수직 길이 (폴리라인 중심 기준 좌우 길이 합).
Perpendicular length of the cross-section (total length left and right from the polyline center).
-
Default Value:
50
Methods
기존 횡단면 primitives의 길이를 새로운 _perpendicularLength에 맞게 수정합니다.
Returns:
종단면과 모든 횡단면의 고도 프로파일 데이터를 계산합니다.
Calculates the elevation profile data for the longitudinal section and all cross-sections.
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
options |
Object |
옵션 객체.
|
Returns:
콜백 함수를 통해 결과가 비동기적으로 반환됩니다. The result is returned asynchronously via the callback function.
분석 인스턴스와 관련된 모든 Primitive를 제거하고 내부 상태를 초기화합니다.
Removes all Primitives associated with the analysis instance and resets the internal state.