一、异常情况说明
当前部署的iServer版本为 10i(2020) (10.1.4-linux64) ;
发布原始数据为手工模型3DMax格式。
在浏览器获取得到S3M配置信息如下(将geoBounds和position敏感字段删除了):
{
"asset": "SuperMap",
"compressedPackageType": "Zip",
"crs": "epsg:4326",
"dataType": "BIM",
"extensions": {
"attachFiles": [],
"hasSpatialIndex": "TRUE",
"levels": [],
"pointCloudLayers": [],
"processType": "Normal",
"renderMode": "Batch",
"s3m:AttributeExtentName": "attribute",
"s3m:FileType": "OSGBCacheFile",
"s3m:MaterialType": "Normal",
"s3m:StoreType": "SingleFile",
"s3m:TextureCompressionType": "DXT",
"s3m:TextureSharing": "TRUE",
"s3m:TileSplitType": "GLOBAL",
"s3m:TransparencyOptimization": "TRUE",
"s3m:VertexWeightMode": "Height",
"scales": [
{
"caption": "727",
"tilewidth": "49.26",
"value": "0.001374935603648082"
}
],
"vol": []
},
"heightRange": {
"max": 66.29599726444077,
"min": 22.63398851513071
},
"idFieldName": "SmID",
"lodType": "Replace",
"pyramidSplitType": "QuadTree",
"tiles": [
{
"boundingbox": {
"max": {
"x": 77.58744017425971,
"y": 93.59958120357844,
"z": 25.1890336899341
},
"min": {
"x": 75.94317683089132,
"y": 92.13757258058846,
"z": 23.18248855522772
}
},
"url": "24.s3mblock"
}
],
"version": "2.0",
"wDescript": {
"category": "",
"range": {
"max": 66.29599726444077,
"min": 22.63398851513071
}
}
}
使用 https://github.com/SuperMap/s3m-spec 的SDK,参考其中的js代码。对应使用原生Cesium.js 1.95版本。前端代码示意如下:
let layer = new S3MTilesLayer({
context : scene._context,
url: '/pathxxx/iserver/services/3D-mydataset/rest/realspace/datas/mydataname/config'
});
scene.primitives.add(layer);
错误消息提示:S3MTile.js:247 Uncaught (in promise) incorrect header check
错误堆栈:
unZip (S3ModelParser.js:82)
S3ModelParser.parseBuffer (S3ModelParser.js:1660)
contentReadyFunction (S3MTile.js:294)
(匿名) (S3MTile.js:347)
Promise.then(异步)
S3MTile.requestContent (S3MTile.js:341)
requestTiles (S3MTilesLayer.js:315)
S3MTilesLayer.update (S3MTilesLayer.js:371)
PrimitiveCollection.update (PrimitiveCollection.js:377)
updateAndRenderPrimitives (Scene.js:3648)
executeCommandsInViewport (Scene.js:3403)
Scene4.updateAndExecuteCommands (Scene.js:3124)
render (Scene.js:4176)
tryAndCatchError (Scene.js:4195)
Scene4.render (Scene.js:4285)
CesiumWidget.render (CesiumWidget.js:802)
render2 (CesiumWidget.js:41)
requestAnimationFrame(异步)
render2 (CesiumWidget.js:42)
requestAnimationFrame(异步)
render2 (CesiumWidget.js:42)
requestAnimationFrame(异步)
render2 (CesiumWidget.js:42)
requestAnimationFrame(异步)
startRenderLoop (CesiumWidget.js:68)
set (CesiumWidget.js:581)
CesiumWidget (CesiumWidget.js:371)
Viewer (Viewer.js:510)
(匿名) (AllS3MService.html?_ijt=7sbn5hur5mdsu0fc5mkd3l2mds:28)
其他:
前端代码应该是没有问题的,因为其他数据可以比如管线数据可以接入进来。当前错误消息定义位于 pako_inflate.min.js 文件中。
二、问题和诉求
- 为什么config拿到的S3M描述版本号为2.0?
- 当前s3mb解析过程中的解压失败是否是因为数据格式为2.0导致的?怎么解决或者这份数据应该怎样接入到原生Cesium环境下?
- S3M 2.0标准看起来没有公开,我没有搜索到任何有关的信息,官方是否有公开标准和解析方法的计划?
- 官方针对 https://github.com/SuperMap/s3m-spec 仓库是否仍然维护,因为cesium.js新版本去掉when.js依赖,当前仓库状态无法适配最新版本的Cesium.js