Geocoder

new Cesium.Geocoder(options)

A widget for finding addresses and landmarks, and flying the camera to them. Geocoding is performed using Cesium ion.
参数名称 类型 描述信息
options object Object with the following properties:
参数名称 类型 默认值 描述信息
container Element | string The DOM element or ID that will contain the widget.
scene Scene The Scene instance to use.
geocoderServices Array.<GeocoderService> 可选 The geocoder services to be used
autoComplete boolean true 可选 True if the geocoder should query as the user types to autocomplete
flightDuration number 1.5 可选 The duration of the camera flight to an entered location, in seconds.
destinationFound Geocoder.DestinationFoundFunction GeocoderViewModel.flyToDestination 可选 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.

成员(属性)

Gets the parent container.

searchSuggestionsContainer : Element

Gets the parent container.
Gets the view model.

方法

Destroys the widget. Should be called if permanently removing the widget from layout.

isDestroyed()boolean

返回值:
true if the object has been destroyed, false otherwise.

定义的类型

Cesium.Geocoder.DestinationFoundFunction(viewModel, destination)

A function that handles the result of a successful geocode.
参数名称 类型 描述信息
viewModel GeocoderViewModel The view model.
destination Cartesian3 | Rectangle The destination result of the geocode.