http://support.supermap.com.cn:8090/webgl/examples/editor.html#S3MTiles_suofeiya
根据此页面的例子。
其中范例加载如下:
var promise = scene.addS3MTilesLayerByScp(URL_CONFIG.SCP_SUOFEIYA,{
name : 'suofeiya'
});
alert到URL_CONFIG.SCP_SUOFEIYA的值为<!--StartFragment -->
<!--StartFragment -->
http://www.supermapol.com/realspace/services/3D-suofeiya_church/rest/realspace/datas/Config/config
打开该连接之后,页面显示:
1.00000 OSGBFile 183.047668 119.841805 126.6212880000000100 45.7681720000000000 0.0000000000000000 -312.71305592871289 -247.99321326155314 -110.33845879633327 195.51243151719319260.23227418435295 397.88702864957281 ./Tile_+002_+001/Tile_+002_+001.s3m -121.000004 -78.000006 143.819794 74.736017 ./Tile_+002_+002/Tile_+002_+002.s3m -121.000004 21.999996144.318783 74.611635 ./Tile_+002_+003/Tile_+002_+003.s3m -121.000004 121.997066 139.887085 73.082734 ./Tile_+003_+001/Tile_+003_+001.s3m -21.000004 -78.778616 151.82428078.100613 ./Tile_+003_+002/Tile_+003_+002.s3m -21.000004 21.999996 142.826138 74.139473 ./Tile_+003_+003/Tile_+003_+003.s3m -20.987918 121.999992 138.409752 72.862395./Tile_+004_+001/Tile_+004_+001.s3m 78.998935 -78.000006 143.932476 75.009651 ./Tile_+004_+002/Tile_+004_+002.s3m 78.999994 21.999996 140.473911 73.784166./Tile_+004_+003/Tile_+004_+003.s3m 78.999994 121.999084 143.426586 74.218229
在该线上服务中,我在这个空间内,没翻到关于name : 'suofeiya'的任何信息。
随后在本地发布了一个S3M的缓存工作空间,点击到如上同样的连接,却显示以下代码:
<?xml version="1.0" encoding="UTF-8"?>
-<SuperMapCache xmlns:sml="http://www.supermap.com/SuperMapCache/vectorltile">
<sml:Version>1.10000</sml:Version>
<sml:FileType>OSGBCacheFile</sml:FileType>
<sml:RenderMode>Batch</sml:RenderMode>
<sml:TileSplitType>GLOBAL</sml:TileSplitType>
<sml:PyramidSplitType>Octree</sml:PyramidSplitType>
<sml:ProcessType>Normal</sml:ProcessType>
-<sml:Scales>
-<sml:Scale>
<sml:Value>0.0004430662393142064</sml:Value>
<sml:Caption>2256</sml:Caption>
<sml:TileWidth>152.87</sml:TileWidth>
</sml:Scale>
</sml:Scales>
-<sml:Position>
<sml:X>116.299988912127360</sml:X>
<sml:Y>38.200049250716127</sml:Y>
<sml:Z>0.00000</sml:Z>
</sml:Position>
-<sml:Bounds>
<sml:Left>116.29970656744383</sml:Left>
<sml:Top>38.200372678471219</sml:Top>
<sml:Right>116.30027125681087</sml:Right>
<sml:Bottom>38.199725822961035</sml:Bottom>
</sml:Bounds>
-<sml:OSGFiles>
-<sml:Files>
<sml:FileName>./Tile_-27817_84687_0000/Tile_-27817_84687_0000.s3m</sml:FileName>
-<sml:BoundingSphere>
<sml:CenterX>1.915889</sml:CenterX>
<sml:CenterY>-4.481720</sml:CenterY>
<sml:CenterZ>25.276933</sml:CenterZ>
<sml:Radius>63.378298</sml:Radius>
</sml:BoundingSphere>
</sml:Files>
</sml:OSGFiles>
</SuperMapCache>
问题1:我发布的S3M和线上的数据,差别在哪? 是因为什么导致的这个差异?该怎么去处理成能适用于加载S3M的标准?
问题2:name : '' 这个name是从哪来的? 是在超图桌面端加载缓存的时候定义的吗?