通过Pelias服务器提供地理编码。
Name | Type | Description |
---|---|---|
url |
Resource | String | Pelias服务器的终端。 |
Example:
// 配置Viewer以使用由https://geocode.earth/承载的Pelias服务器
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
readonlyurl : Resource
用于访问Pelias终端的资源。
Methods
geocode(query, type) → Promise.<Array.<GeocoderService~Result>>
Name | Type | Default | Description |
---|---|---|---|
query |
String | 要发送到地理编码服务的查询。 | |
type |
GeocodeType |
GeocodeType.SEARCH
|
optional 要执行的地理编码的类型。 |