# PeliasGeocoderService

#### new Cesium.PeliasGeocoderService(url)
Core/PeliasGeocoderService.js 26

Provides geocoding via a Pelias server.

Name | Type | Description
--- | --- | ---
`url` | Resource | String | The endpoint to the Pelias server.

##### Example:

    // Configure a Viewer to use the Pelias server hosted by https://geocode.earth/
    var viewer = new Cesium.Viewer('cesiumContainer', {
      geocoder: new Cesium.PeliasGeocoderService(new Cesium.Resource({
        url: 'https://api.geocode.earth/v1/',
          queryParameters: {
            api_key: '<Your geocode.earth API key>'
        }
      }))
    });

### Members

#### readonly url : Resource
Core/PeliasGeocoderService.js 42

The Resource used to access the Pelias endpoint.

### Methods

#### geocode(query, type) → Promise.<Array.<GeocoderService.Result>>
Core/PeliasGeocoderService.js 56

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: