new Cesium.PeliasGeocoderService(url)

Provides geocoding via a Pelias server.
Name Type Description
url Resource | string Pelias服务器的终点.
Example:
// 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>'
    }
  }))
});

Members

readonly credit : Credit|undefined

在完成地理代码后获得显示的信用值 。 通常,这是用来信用的 地理编码器服务.

readonly url : Resource

用于访问 Pelias 端点的资源 .

Methods

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

Name Type Default Description
query string 要发送到地理编码器服务的查询
type GeocodeType GeocodeType.SEARCH optional The type of geocode to perform.
Returns:
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.