DitapGeocoder

주소와 랜드마크를 찾아 해당 위치로 카메라 이동시키는 위젯. 지오코딩은 Vworld Api를 사용하여 수행.
DitapViewer 내부적으로 생성되어 사용하는 위젯.
A widget for finding addresses and landmarks, and flying the camera to them. Geocoding is performed using Vworld Api.
The widget used internally by DitapViewer.

new Ditap.DitapGeocoder(object, viewer)

Name Type Description
object object 다음과 같은 속성을 가진 객체.
Object with the following properties:
Name Type Description
container Element | string 위젯을 포함할 DOM 요소 또는 ID.
The DOM element or ID that will contain the widget.
scene Scene 사용할 Scene 인스턴스.
The Scene instance to use.
geocoderServices DitapVworldGeocoderService 사용할 지오코더 서비스.
The geocoder services to be used.
viewer DitapViewer 사용할 Ditap Viewer 인스턴스.
The DitapViewer instance to use.
Example:
// 샌드캐슬 예제 'DiTAP - Search Address' 참조
// 1. DitapViewer 생성 시 DitapGeocoder 생성 가능.
const viewer = new Ditap.DitapViewer("ditapContainer", {
   geocoder: {
     key: "Vworld에서 발급받은 Api Key"
   },
});

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

const geocoderContainer = viewer.container.getElementsByClassName(
   "js-ditap-toolbal-top-wrap"
)[0];

const koreanGeocoderOptions = {
   key: "vworld 발급 api key",
};

const geocoderService = new Ditap.DitapVworldGeocoderService(koreanGeocoderOptions);

const geocoderOptions = {
   scene: viewer.scene,
   container: geocoderContainer,
   geocoderService: geocoderService,
};

const ditapGeocoder = new Ditap.DitapGeocoder(geocoderOptions, viewer);

Extends

Members

container : Element

Gets the parent container.
Inherited From:

searchSuggestionsContainer : Element

Gets the parent container.
Inherited From:

viewer : DitapViewer

사용할 Ditap Viewer 인스턴스.
The DitapViewer instance to use.

viewModel : GeocoderViewModel

Gets the view model.
Inherited From:

Methods

destroy()

위젯 파괴. 영구적으로 제거하는 경우 호출.
Destroys the widget. Should be called if permanently removing the widget from layout.

isDestroyed()boolean

Returns:
true if the object has been destroyed, false otherwise.
Inherited From: