DitapWeather

날씨 정보를 표시하는 위젯 클래스.
A widget that displays weather information.

new Ditap.DitapWeather(viewer, options)

Name Type Description
viewer DitapViewer 날씨 정보를 표시할 뷰어.
options Object 날씨 정보를 표시할 뷰어의 옵션.
Name Type Description
vworldKey string 브이월드 api key.
weatherKey string 기상청 api key.
Example:
// 샌드 캐슬 예제 'DiTAP - Ditap Weather' 참조

//vworld 인증 키 발급
//https://www.vworld.kr/dev/v4api.do
//기상청 인증 키 발급
//https://www.data.go.kr/index.do

const ditapWeatherOptions = {
   vworldKey: "vworld 발급 api key",
   weatherKey: "기상청 발급 api key",
};

// 1. 뷰어 선언 시 활성화
const ditapViewer = new DitapViewer("ditapContainer", {
  weather: ditapWeatherOptions,
});

// 2. 단독으로 선언하여 활성화
const ditapViewer = new Ditap.DitapViewer("ditapContainer");

const ditapWeather = new Ditap.DitapWeather(ditapViewer, ditapWeatherOptions);

Methods

closePopup()

날씨 팝업 닫기.
Close the weather popup.

destroy()

위젯 파괴. 영구적으로 제거하는 경우 호출.
Destroys the widget. Call this when permanently removing the widget.

openPopup()

날씨 팝업 표시.
Display the weather popup.