GeocoderService

new Cesium.GeocoderService()

通过外部服务提供地理编码。此类型描述了一个接口,不打算直接使用。
See:

Members

readonly credit : Credit|undefined

获取地理编码执行后要显示的信用信息。通常用于给地理编码服务署名。

Methods

static Cesium.GeocoderService.getCreditsFromResult(geocoderResult)Array.<Credit>|undefined

从地理编码结果属性中解析信用信息(如果存在)。
Name Type Description
geocoderResult GeocoderService.Result 地理编码结果
Returns:
如果结果中存在信用信息则返回信用列表,否则返回undefined

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

Name Type Default Description
query string 要发送到地理编码服务的查询
type GeocodeType GeocodeType.SEARCH optional 要执行的地理编码类型。
Returns:

Type Definitions

Cesium.GeocoderService.Result

Properties:
Name Type Attributes Description
displayName string 位置的显示名称
destination Rectangle | Cartesian3 位置的边界框
attributions Array.<object> <optional>
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.