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 如果地理编码器应在用户键入自动完成时进行查询,则为True
flightDuration number 1.5 optional 摄像机飞行到输入位置的持续时间,以秒为单位。
destinationFound Geocoder.DestinationFoundFunction GeocoderViewModel.flyToDestination optional 在地理编码成功后调用的回调函数。如果没有提供,默认行为是将相机飞到结果目的地。

Members

获取父容器
获取数据

searchSuggestionsContainer : Element

获取父容器。
获取模型

Methods

销毁小部件,如果永久 从布局在中移除小部件

isDestroyed()boolean

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

Type Definitions

Cesium.Geocoder.DestinationFoundFunction(viewModel, destination)

处理成功地理编码结果的函数。
Name Type Description
viewModel GeocoderViewModel 视图模型。
destination Cartesian3 | Rectangle 地理编码的目标结果。
需要帮助?获得答案的最快方法是来自社区和团队 Cesium Forum.