PeliasGeocoderService

new Cesium.PeliasGeocoderService(url)

通过 Pelias 服务器提供地理编码(geocoding)功能。
Name Type Description
url Resource | string 指向 Pelias 服务器的端点(endpoint)。
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

获取在执行地理编码后要显示的版权信息(credit)。通常这用于标注地理编码服务。
用于访问 Pelias 端点的 Resource。

Methods

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

Name Type Default Description
query string 要发送给地理编码服务的查询。
type GeocodeType GeocodeType.SEARCH optional 要执行的地理编码类型。
Returns:
需要帮助?获取答案的最快方式是在 Cesium 论坛 上向社区和团队提问。