Geocoder

new Cesium.Geocoder(options)

一个小部件,用于查找地址和地标,并将摄像头飞向它们。地理编码是 使用Cesium ion执行。
Name Type Description
options Object 具有以下属性的对象:
Name Type Default Description
container Element | String 将包含小部件的DOM元素或ID。
scene Scene 要使用的场景实例。
geocoderServices Array.<GeocoderService> optional 要使用的地理编码器服务
autoComplete Boolean true optional 如果geocoder应在用户键入要自动完成的操作时进行查询,则为True
flightDuration Number 1.5 optional 相机飞行到输入位置的持续时间,以秒为单位。
destinationFound Geocoder.DestinationFoundFunction GeocoderViewModel.flyToDestination optional 在地理编码成功后调用的回调函数。如果未提供,默认行为是将摄影机飞到结果目标。

Members

container : Element

获取父容器。

searchSuggestionsContainer : Element

获取父容器。
获取视图模型。

Methods

销毁小部件。如果是永久性的 正在从布局中删除小部件。

isDestroyed()Boolean

Returns:
如果对象已被销毁,则为true,否则为false。

Type Definitions

Cesium.Geocoder.DestinationFoundFunction(viewModel, destination)

处理成功地理编码结果的函数。
Name Type Description
viewModel GeocoderViewModel 视图模型。
destination Cartesian3 | Rectangle 目标地理代码的结果。