# GeocoderService

#### new Cesium.GeocoderService()
engine/Source/Core/GeocoderService.js 22

Provides geocoding through an external service. This type describes an interface and is not intended to be used.

##### See:

- BingMapsGeocoderService
- PeliasGeocoderService
- OpenCageGeocoderService

### Members

#### readonly credit : Credit|undefined
engine/Source/Core/GeocoderService.js 34

Gets the credit to display after a geocode is performed. Typically this is used to credit the geocoder service.

### Methods

#### static Cesium.GeocoderService.getCreditsFromResult(geocoderResult) → Array.<Credit>|undefined
engine/Source/Core/GeocoderService.js 44

Parses credits from the geocoder result attributions, if present.

Name | Type | Description
--- | --- | ---
`geocoderResult` | GeocoderService.Result | The geocoder result

##### Returns:

A list of credits if present in the result, otherwise undefined

#### geocode(query, type) → Promise.<Array.<GeocoderService.Result>>
engine/Source/Core/GeocoderService.js 59

Name | Type | Default | Description
--- | --- | --- | ---
`query` | string |  | The query to be sent to the geocoder service
`type` | GeocodeType | `GeocodeType.SEARCH` | optional The type of geocode to perform.

##### Returns:

### Type Definitions

#### Cesium.GeocoderService.Result
engine/Source/Core/GeocoderService.js 5

##### Properties:

Name | Type | Attributes | Description
--- | --- | --- | ---
`displayName` | string |  | The display name for a location
`destination` | Rectangle | Cartesian3 |  | The bounding box for a location
`attributions` | Array.<object> | <optional> |

Need help? The fastest way to get answers is from the community and team on the Cesium Forum.