MapGISTerrainProvider

MapGISTerrainProvider MapGIS地形provider

new Cesium.MapGISTerrainProvider(options)

Name Type Description
options Object
Name Type Default Description
url String | Resource | Array.<Object> null optional 服务基地址,当类型为字符串或者Cesium.Resource时, 表示仅加载一个DEM地形服务,如果是一个数组,则表示加载多个DEM地形服务, 此时传入的格式变为了[{url:'',range:{},range3D:{},requestVertexNormals:true,maxLevel:20}]
tilingScheme Object Cesium.GeographicTilingScheme() optional 地形的平铺方案
range Object null optional 地形二维范围
range3D Object null optional 地形三维范围
requestVertexNormals Boolean false optional 是否请求法向量
maxLevel Number 20 optional 地形最大显示级数
terrainColorTblInfo Array null optional 地形分析-高程赋色功能的色表,格式为['#000000', '#2747E0', '#D33B7D', '#D33038', '#FF9742', '#ffd700', '#FFFFFF']
terrainColorTblMinHeight Number null optional 地形分析-高程赋色功能的最小高度
terrainColorTblMaxHeight Number null optional 地形分析-高程赋色功能的最大高度
repeat Cartesian2 new Cartesian2(1, 1) optional 坡度箭头重复次数
proxy Proxy null optional 请求拦截器,可对最后发出的请求链接进行编辑
credit Proxy null optional A credit for the data source, which is displayed on the canvas

Members

该属性记录了MapGISTerrainProvider下的地形图层支持的级数和每一级数支持显示的地形瓦片行列号范围; 当提供了一个地形瓦片的级数、行号和列号时,可通过该对象的isTileAvailable方法知道地形图层是否包含该地形瓦片; 当MapGISTerrainProvider未加载完毕时,不可访问该对象; 当服务元信息中未包含available属性时,该对象为空;
Gets an object that can be used to determine availability of terrain from this provider, such as at points and in rectangles. This function should not be called before MapGISTerrainProvider#ready returns true. This property may be undefined if availability information is not available. Note that this reflects tiles that are known to be available currently. Additional tiles may be discovered to be available in the future, e.g. if availability information exists deeper in the tree rather than it all being discoverable at the root. However, a tile that is available now will not become unavailable in the future.
Gets the credit to display when this terrain provider is active. Typically this is used to credit the source of the terrain. This function should not be called before CesiumTerrainProvider#ready returns true.
Gets an event that is raised when the terrain provider encounters an asynchronous error. By subscribing to the event, you will be notified of the error and can potentially recover from it. Event listeners are passed an instance of TileProviderError.

readonly hasVertexNormals : Boolean

是否应用地形法向量
地形最大显示级数
Default Value: 20
请求拦截器,可对最后发出的请求链接进行编辑
Default Value: undefined
地形二维范围
Default Value: undefined
地形三维范围
Default Value: undefined
地形是否可用

readonly readyPromise : Promise.<Boolean>

地形可用后的回调,此时地形数据不一定加载完毕
坡度箭头的重复次数

readonly requestVertexNormals : Boolean

是否请求法向量

terrainColorTblInfo : Array

地形分析-高程赋色功能的色表,格式为['#000000', '#2747E0', '#D33B7D', '#D33038', '#FF9742', '#ffd700', '#FFFFFF']
Default Value: undefined

terrainColorTblMaxHeight : Number

地形分析-高程赋色功能的最大高度
Default Value: undefined

terrainColorTblMinHeight : Number

地形分析-高程赋色功能的最小高度
Default Value: undefined
Gets the tiling scheme used by this provider. This function should not be called before CesiumTerrainProvider#ready returns true.
服务基地址
Default Value: undefined

Methods

getLevelMaximumGeometricError(level)Number

重写Cesium.TerrainProvider的getLevelMaximumGeometricError方法, 重写了该方法,则被认为是一个TerrainProvider 通过给定的级数计算最大几何误差,并返回
Name Type Description
level Number 级数
Returns:
最大几何误差

getTileDataAvailable(x, y, level)Boolean

确定一个地形瓦片是否被MapGISTerrainProvider中的某一个地形图层包含
Name Type Description
x Number 地形瓦片的行号
y Number 地形瓦片的列号
level Number 地形瓦片的级数
Returns:
该地形瓦片是否被MapGISTerrainProvider包含

loadTileDataAvailability(x, y, level)undefined|Promise.<void>

根据级数、行号和列号,请求一个包含在地形图层中的地形瓦片数据,如果有多个地形图层,则取匹配到的第一个地形图层
Name Type Description
x Number 行号
y Number 列号
level Number 级数
Returns:
取得数据后的回调函数,没有匹配则返回undefined

requestTileGeometry(x, y, level, request)Promise.<HeightmapTerrainData>|undefined

重写Cesium.TerrainProvider的requestTileGeometry方法, 重写了该方法,则被认为是一个TerrainProvider 通过该方法请求地形瓦片数据
Name Type Description
x Number 行号
y Number 列号
level Number 级数
request Request Cesium的请求相关对象
Returns:
请求完毕的回调