# GeocoderViewModel

#### new Cesium.GeocoderViewModel(options)
Widgets/Geocoder/GeocoderViewModel.js 49

  The view model for the `Geocoder` widget.

  Name | Type | Description
  --- | --- | ---

  `options`

  Object

  Object with the following properties:

  Name | Type | Default | Description
  --- | --- | --- | ---
  `scene` | Scene |  | The Scene instance to use.
  `url` | String | `'https://dev.virtualearth.net'` | optional The base URL of the Bing Maps API.

  `key`

  String

  optional The Bing Maps key for your application, which can be created at https://www.bingmapsportal.com. If this parameter is not provided, `BingMapsApi.defaultKey` is used. If `BingMapsApi.defaultKey` is undefined as well, a message is written to the console reminding you that you must create and supply a Bing Maps key as soon as possible. Please do not deploy an application that uses this widget without creating a separate key for your application.

  `flightDuration` | Number |  | optional The duration of the camera flight to an entered location, in seconds.

### Members

#### complete : Event
Widgets/Geocoder/GeocoderViewModel.js 186

  Gets the event triggered on flight completion.

#### flightDuration : Number|undefined
Widgets/Geocoder/GeocoderViewModel.js 138

  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.
  Default Value: `undefined`

#### isSearchInProgress : Boolean
Widgets/Geocoder/GeocoderViewModel.js 98

  Gets a value indicating whether a search is currently in progress. This property is observable.

#### keepExpanded : Boolean
Widgets/Geocoder/GeocoderViewModel.js 89

  Gets or sets a value indicating if this instance should always show its text input field.
  Default Value: `false`

#### key : String
Widgets/Geocoder/GeocoderViewModel.js 174

  Gets the Bing maps key.

#### scene : Scene
Widgets/Geocoder/GeocoderViewModel.js 198

  Gets the scene to control.

#### search : Command
Widgets/Geocoder/GeocoderViewModel.js 210

  Gets the Command that is executed when the button is clicked.

#### searchText : String
Widgets/Geocoder/GeocoderViewModel.js 111

  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.

#### url : String
Widgets/Geocoder/GeocoderViewModel.js 162

  Gets the Bing maps url.