GeocoderService

new Cesium.GeocoderService()

Provides geocoding through an external service. This type describes an interface and is not intended to be used.
参考:

成员(属性)

readonly credit : Credit|undefined

Gets the credit to display after a geocode is performed. Typically this is used to credit the geocoder service.

方法

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

Parses credits from the geocoder result attributions, if present.
参数名称 类型 描述信息
geocoderResult GeocoderService.Result The geocoder result
返回值:
A list of credits if present in the result, otherwise undefined

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.
返回值:

定义的类型

Cesium.GeocoderService.Result

属性:
属性名称 类型 可选 描述信息
displayName string The display name for a location
destination Rectangle | Cartesian3 The bounding box for a location
attributions Array.<object> <可选>