PopupSolarAnalysisController

일조권 분석 컨트롤러 팝업 클래스.
Popup class for controlling solar analysis.

new Ditap.PopupSolarAnalysisController(options)

Name Type Description
options Object 옵션 객체.
Options object.
Name Type Description
viewer DitapViewer 사용할 DitapViewer 인스턴스.
The DitapViewer instance to use.
apiKey String 일조권 분석 API 키.
API key for solar analysis.
animation Boolean 일조권 분석 애니메이션 사용 여부.
Whether to use animation for solar analysis.
parent Element optional 팝업이 삽입될 부모 DOM 요소 (선택 사항).
The parent DOM element where the popup is inserted (optional).
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

appendContent(element)

컨텐츠 영역에 요소 추가.
Append element to content.
Name Type Description
element Element 추가할 요소.
Element to add.
Inherited From:

appendFooter(element)

푸터 영역에 요소 추가.
Append element to footer.
Name Type Description
element Element 추가할 요소.
Element to add.
Inherited From:

appendHeader(element)

헤더 영역에 요소 추가.
Append element to header.
Name Type Description
element Element 추가할 요소.
Element to add.
Inherited From:

close()

팝업 닫기.
Closes the popup.

destroy()

이 객체의 모든 리소스 제거.
Remove all resources of this object.
Inherited From:

async getSunriseSunset()

분석 지점의 위치와 분석 기준 날짜를 사용하여 일출/일몰 정보를 조회합니다.
Retrieves sunrise/sunset information based on the analysis point and the selected date.

open()

팝업 열기.
Opens the popup.

prependContent(element)

컨텐츠 영역 맨 앞에 요소 추가.
Prepend element to content.
Name Type Description
element Element 추가할 요소.
Element to add.
Inherited From:

prependFooter(element)

푸터 영역 맨 앞에 요소 추가.
Prepend element to footer.
Name Type Description
element Element 추가할 요소.
Element to add.
Inherited From:

prependHeader(element)

헤더 영역 맨 앞에 요소 추가.
Prepend element to header.
Name Type Description
element Element 추가할 요소.
Element to add.
Inherited From:

removeAllContent()

컨텐츠 영역의 모든 자식 요소 제거.
Remove all children of content.
Inherited From:

removeAllFooter()

푸터 영역의 모든 자식 요소 제거.
Remove all children of footer.
Inherited From:

removeAllHeader()

헤더 영역의 모든 자식 요소 제거.
Remove all children of header.
Inherited From:

removeContent(element)

컨텐츠 영역의 자식 요소 제거.
Remove children of content.
Name Type Description
element Element 제거할 요소.
Element to remove.
Inherited From:

removeFooter(element)

푸터 영역의 자식 요소 제거.
Remove children of footer.
Name Type Description
element Element 제거할 요소.
Element to remove.
Inherited From:

removeHeader(element)

헤더 영역의 자식 요소 제거.
Remove children of header.
Name Type Description
element Element 제거할 요소.
Element to remove.
Inherited From:

setAnalysisPoint()

분석 지점을 설정합니다.
Sets the analysis point.

setOnClose(callback)

팝업이 닫힐 때 실행할 콜백을 설정합니다.
Sets a callback to be executed when the popup is closed.
Name Type Description
callback function 닫힐 때 실행할 콜백 함수.
Callback function to execute on close.

async startAnalysis(selectedDate)

선택한 기준 날짜를 사용하여 일출/일몰 정보를 가져오고 일조 분석을 수행합니다.
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).

toggle(element)

팝업 활성화 on/off 기능.
Function on and off.
Name Type Description
element Element 매개변수가 없는 경우 wrapper 오픈.
If no parameter is entered, toggle wrapper.
Inherited From: