Appearance
KBE3D / KBCore / Cesium / GeocoderViewModel
类: GeocoderViewModel
The view model for the Geocoder widget.
参数
Object with the following properties:
参数
The Scene instance to use.
参数
Geocoder services to use for geocoding queries. If more than one are supplied, suggestions will be gathered for the geocoders that support it, and if no suggestion is selected the result from the first geocoder service wil be used.
参数
The duration of the camera flight to an entered location, in seconds.
参数
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.
属性
flyToDestination
staticflyToDestination:DestinationFoundFunction
A function to fly to the destination found by a successful geocode.
keepExpanded
keepExpanded:
boolean
Gets or sets a value indicating if this instance should always show its text input field.
autoComplete
autoComplete:
boolean
True if the geocoder should query as the user types to autocomplete
destinationFound
destinationFound:
DestinationFoundFunction
Gets and sets the command called when a geocode destination is found
isSearchInProgress
isSearchInProgress:
boolean
Gets a value indicating whether a search is currently in progress. This property is observable.
searchText
searchText:
string
Gets or sets the text to search for. The text can be an address, or longitude, latitude, and optional height, where longitude and latitude are in degrees and height is in meters.
flightDuration
flightDuration:
number|undefined
Gets or sets the the duration of the camera flight in seconds. A value of zero causes the camera to instantly switch to the geocoding location. The duration will be computed based on the distance when undefined.
complete
complete:
Event
Gets the event triggered on flight completion.
scene
scene:
Scene
Gets the scene to control.
search
search:
Command
Gets the Command that is executed when the button is clicked.
selectedSuggestion
selectedSuggestion:
any
Gets the currently selected geocoder search suggestion
suggestions
suggestions:
object[]
Gets the list of geocoder search suggestions
方法
destroy()
调用签名
destroy():
void
Destroys the widget. Should be called if permanently removing the widget from layout.
返回
void
调用签名
destroy():
void
Destroys the widget. Should be called if permanently removing the widget from layout.
返回
void
isDestroyed()
isDestroyed():
boolean
返回
boolean
true if the object has been destroyed, false otherwise.
构造函数
构造函数
new GeocoderViewModel(
options: {scene:Scene;geocoderServices?:GeocoderService[];flightDuration?:number;destinationFound?:DestinationFoundFunction; }):GeocoderViewModel
参数
options
scene
geocoderServices?
flightDuration?
number
destinationFound?
返回
GeocoderViewModel
