Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
옵션 객체.Options object.
|
Example:
// 샌드캐슬 예제 'DiTAP - Solar' 참조
const viewer = new Ditap.DitapViewer("ditapContainer", {
fullscreenButton: true,
baseLayerPicker: true,
});
// 초기 카메라 위치 설정
viewer.camera.setView({
destination: Ditap.Cartesian3.fromDegrees(
126.9782349646649,
37.56671536989183,
150
),
orientation: {
heading: Ditap.Math.toRadians(0),
roll: 0,
},
});
// 태양 위치에 따른 그림자 효과
viewer.scene.globe.enableLighting = true;
viewer.scene.globe.shadows = true;
viewer.scene.globe.receiveShadows = true;
viewer.shadows = true;
viewer.terrainShadows = Ditap.ShadowMode.ENABLED;
// 지도 밝기 조절
viewer.scene.globe.lightingFadeOutDistance = 10000;
viewer.scene.globe.lightingFadeInDistance = 10000;
// InteractionSolar 생성
const interactionSolar = new Ditap.InteractionSolar({
viewer: viewer,
apiKey:
"6VfToXRgNMs9CnW9lKYLAUaWk%2FuHDT745Nf0HytWqOq5CE%2BbKGaaLn2%2FtI4Sx0Sh%2FZutrVvh4YQk9975%2FaQ5Xg%3D%3D",
animation: true,
});
// 모델 좌표
const modelPosition = new Ditap.Cartesian3.fromDegrees(
126.9782349646649,
37.56671536989183,
0
);
// 모델 행렬 생성
const modelMatrix = Ditap.Transforms.eastNorthUpToFixedFrame(modelPosition);
// 모델 인스턴스 생성
const model = await Ditap.Model.fromGltfAsync({
id: "model_01",
url: "../../SampleData/models/GroundVehicle/GroundVehicle.glb",
modelMatrix: modelMatrix,
minimumPixelSize: 128,
maximumScale: 3.0,
scale: 3.0,
});
// 모델 추가
viewer.scene.primitives.add(model);
popup.open();
Extends
Methods
컨텐츠 영역에 요소 추가.
Append element to content.
Append element to content.
Name | Type | Description |
---|---|---|
element |
Element |
추가할 요소. Element to add. |
- Inherited From:
푸터 영역에 요소 추가.
Append element to footer.
Append element to footer.
Name | Type | Description |
---|---|---|
element |
Element | 추가할 요소. Element to add. |
- Inherited From:
헤더 영역에 요소 추가.
Append element to header.
Name | Type | Description |
---|---|---|
element |
Element |
추가할 요소. Element to add. |
- Inherited From:
팝업 닫기.
Closes the popup.
이 객체의 모든 리소스 제거.
Remove all resources of this object.
- Inherited From:
분석 지점의 위치와 분석 기준 날짜를 사용하여 일출/일몰 정보를 조회합니다.
Retrieves sunrise/sunset information based on the analysis point and the selected date.
팝업 열기.
Opens the popup.
컨텐츠 영역 맨 앞에 요소 추가.
Prepend element to content.
Name | Type | Description |
---|---|---|
element |
Element |
추가할 요소. Element to add. |
- Inherited From:
푸터 영역 맨 앞에 요소 추가.
Prepend element to footer.
Name | Type | Description |
---|---|---|
element |
Element | 추가할 요소. Element to add. |
- Inherited From:
헤더 영역 맨 앞에 요소 추가.
Prepend element to header.
Prepend element to header.
Name | Type | Description |
---|---|---|
element |
Element |
추가할 요소. Element to add. |
- Inherited From:
컨텐츠 영역의 모든 자식 요소 제거.
Remove all children of content.
- Inherited From:
푸터 영역의 모든 자식 요소 제거.
Remove all children of footer.
- Inherited From:
헤더 영역의 모든 자식 요소 제거.
Remove all children of header.
Remove all children of header.
- Inherited From:
컨텐츠 영역의 자식 요소 제거.
Remove children of content.
Name | Type | Description |
---|---|---|
element |
Element |
제거할 요소. Element to remove. |
- Inherited From:
푸터 영역의 자식 요소 제거.
Remove children of footer.
Name | Type | Description |
---|---|---|
element |
Element | 제거할 요소. Element to remove. |
- Inherited From:
헤더 영역의 자식 요소 제거.
Remove children of header.
Name | Type | Description |
---|---|---|
element |
Element |
제거할 요소. Element to remove. |
- Inherited From:
분석 지점을 설정합니다.
Sets the analysis point.
팝업이 닫힐 때 실행할 콜백을 설정합니다.
Sets a callback to be executed when the popup is closed.
Name | Type | Description |
---|---|---|
callback |
function | 닫힐 때 실행할 콜백 함수.Callback function to execute on close. |
선택한 기준 날짜를 사용하여 일출/일몰 정보를 가져오고 일조 분석을 수행합니다.
Starts the solar analysis using the selected date by retrieving sunrise/sunset information.
Name | Type | Description |
---|---|---|
selectedDate |
string | "YYYY-MM-DD" 형식의 분석 기준 날짜 (동지 날짜).The analysis reference date in "YYYY-MM-DD" format (winter solstice date). |
팝업 활성화 on/off 기능.
Function on and off.
Name | Type | Description |
---|---|---|
element |
Element | 매개변수가 없는 경우 wrapper 오픈.If no parameter is entered, toggle wrapper. |
- Inherited From: