new Cesium.GeocoderViewModel(options)

The view model for the Geocoder widget.
Name Type Description
options object 下列属性的对象 :
Name Type Default Description
scene Scene The Scene instance to use.
geocoderServices Array.<GeocoderService> optional 用于地理编码查询的地理编码服务. 如果提供不止一种,将收集支持它的地理编码器的建议, 如果未选择建议,则使用第一个地理编码器服务系统的结果.
flightDuration number optional 摄影机飞往进入地点的时间,以秒计.
destinationFound Geocoder.DestinationFoundFunction GeocoderViewModel.flyToDestination optional A callback function that is called after a successful geocode. If not supplied, the default behavior is to fly the camera to the result destination.

Members

static Cesium.GeocoderViewModel.flyToDestination : Geocoder.DestinationFoundFunction

一个通过一个成功的地理编码来飞到目的地的函数.

autoComplete : boolean

如果地理编码器作为自动完成的用户类型查询, 则为真
Default Value: true

complete : Event

获得飞行完成时触发的事件.
当找到地理代码目的地时, 获取并设定命令

flightDuration : number|undefined

获取或设定相机飞行时间数秒. 值为0,使得相机立即切换到地理编码位置. 持续时间将根据未定义的距离计算.
Default Value: undefined

isSearchInProgress : boolean

获得一个显示当前搜索是否正在进行中的值 。 这块地皮是可观察到的.

keepExpanded : boolean

获取或设置一个值,显示此实例是否总是显示其文本输入字段 .
Default Value: false

scene : Scene

让场景控制.
获取单击按钮时执行的命令.

searchText : string

获取或设置要搜索的文本 。 文字可以是地址,也可以是经度,纬度, 和可选高度,其中经度和纬度为度,高度为米.

selectedSuggestion : object

获取当前选中的地理编码器搜索建议

suggestions : Array.<object>

获取地理编码器搜索建议列表

Methods

destroy()

摧毁部件。 如果永久调用, 应该调用 从布局中删除部件 .

destroy()

摧毁部件。 如果永久调用, 应该调用 从布局中删除部件 .

isDestroyed()boolean

Returns:
如果物体已被销毁, 则真实无误 .
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.