PeliasGeocoderService

new Cesium.PeliasGeocoderService(url)

Provides geocoding via a Pelias server.
参数名称 类型 描述信息
url Resource | string The endpoint to the Pelias server.
使用示例:
// Configure a Viewer to use the Pelias server hosted by https://geocode.earth/
const 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>'
    }
  }))
});

成员(属性)

Gets the credit to display after a geocode is performed. Typically this is used to credit the geocoder service.
The Resource used to access the Pelias endpoint.

方法

geocode(query, type)Promise.<Array.<GeocoderService.Result>>

参数名称 类型 默认值 描述信息
query string The query to be sent to the geocoder service
type GeocodeType GeocodeType.SEARCH 可选 The type of geocode to perform.
返回值: