new MapGISTerrainProvider(options)
支持如下方法:
[1、通过场景服务的url获取MapGISTerrainProvider对象]MapGIS地形服务接入类
| Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
|
Members
-
availabilityMapGISTileAvailability
-
该属性记录了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. -
creditCesium.Credit
-
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 Cesium.CesiumTerrainProvider.ready returns true.
-
errorEventCesium.Event
-
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 Cesium.TileProviderError.
-
hasMetadataBoolean
-
Gets a value indicating whether or not the requested tiles include metadata. This function should not be called before Cesium.CesiumTerrainProvider.ready returns true.
-
hasVertexNormalsBoolean
-
是否应用地形法向量,当所有地形子图层的hasVertexNormals和requestVertexNormals参数都为true时, MapGISTerrainProvider的hasVertexNormals属性为true,否则为false
-
idString
-
地形id编号
-
maxLevelNumber
-
地形最大显示级数
- Default Value: 20
proxyObject
请求拦截器,可对最后发出的请求链接进行编辑
rangeObject
地形二维范围
range3DObject
地形三维范围
readyBoolean
地形是否可用
readyPromisePromise
地形可用后的回调,此时地形数据不一定加载完毕
repeatCesium.Cartesian2
坡度箭头的重复次数
requestVertexNormalsBoolean
是否请求法向量
terrainColorTblInfoArray
地形分析-高程赋色功能的色表,格式为['#000000', '#2747E0', '#D33B7D', '#D33038', '#FF9742', '#ffd700', '#FFFFFF']
terrainColorTblMaxHeightNumber
地形分析-高程赋色功能的最大高度
terrainColorTblMinHeightNumber
地形分析-高程赋色功能的最小高度
tilingSchemeCesium.GeographicTilingScheme
Gets the tiling scheme used by this provider. This function should not be called before Cesium.CesiumTerrainProvider.ready returns true.
urlString
服务基地址
Methods
-
MapGISTerrainProvider.fromUrl(url, options){MapGISTerrainProvider|undefined}
engineExtensions/core/MapGISTerrainProvider.js, line 198 -
Name Type Description urlString 服务的基地址
optionsObject 实例化对象时提供的额外配置参数,若该对象中包含构造参数则会覆盖对应的构造参数
Returns:
Type Description MapGISTerrainProvider | undefined Example
const url = 'http://10.10.130.72:8089/igs/rest/services/Scene/TwTerrain/SceneServer' const addTerrainProvider = async (url) => { const imageryProvider = await MapGISTerrainProvider.fromUrl(url) if (terrainProvider) { viewer.terrainProvider = terrainProvider } } addTerrainProvider(url) -
addService(terrainService)
engineExtensions/core/MapGISTerrainProvider.js, line 521 -
添加一个地形服务
Name Type Description terrainServiceMapGISTerrainService 地形服务数据对象
-
getLayersByRange(range){Array.<Object>}
engineExtensions/core/MapGISTerrainProvider.js, line 697 -
返回和range相交的地形子图层对象数组
Name Type Description rangeGeometry 范围几何对象
Returns:
Type Description Array.<Object> 相交的地形子图层对象数组 -
getServiceById(id){MapGISTerrainService|null}
engineExtensions/core/MapGISTerrainProvider.js, line 600 -
通过service的id获取service对象,没有则返null
Name Type Description idString service对象的id
Returns:
Type Description MapGISTerrainService | null service对象 -
removeService(terrainService)
engineExtensions/core/MapGISTerrainProvider.js, line 591 -
删除一个地形服务
Name Type Description terrainServiceMapGISTerrainService 地形服务数据对象
-
removeServices(terrainServices)
engineExtensions/core/MapGISTerrainProvider.js, line 579 -
删除多个地形服务
Name Type Description terrainServicesArray.<MapGISTerrainService> 地形服务数据对象
-
updateService(terrainService)
engineExtensions/core/MapGISTerrainProvider.js, line 632 -
在serviceList中找到id和传入的service对象相同的service进行更新
Name Type Description terrainServiceMapGISTerrainService 地形服务对象
-
updateServiceProperty(id, key, value)
engineExtensions/core/MapGISTerrainProvider.js, line 664 -
在serviceList中找到id和传入的service对象,单独更新service上的某一个属性
Name Type Description idString 地形服务对象的Id
keyString 属性名
valueAny 属性值