|
@@ -736,7 +736,7 @@
|
|
|
number: '', //场景序号
|
|
|
originDatasetId:'',//场景原本的数据集id,应该就是数据集第一个吧
|
|
|
isOfficial:false,
|
|
|
- webSite:'testdata',//'data', //不同环境对应的静态文件的地址不同
|
|
|
+ webSite:'testdata',//正式:'datav1', //不同环境对应的静态文件的地址不同
|
|
|
|
|
|
isLocal:false, //是否本地 局域网版本
|
|
|
libsUrl:'../libs/',
|
|
@@ -63482,9 +63482,18 @@ void main() {
|
|
|
pointcloud.timeStamp = timeStamp;
|
|
|
transformPointcloud(pointcloud,dataset);
|
|
|
scene.addPointCloud(pointcloud);
|
|
|
+
|
|
|
+ if(!Potree.settings.isOfficial){
|
|
|
+ Potree.settings.floorplanEnables[dataset.id] = true;
|
|
|
+ Potree.settings.floorplanType[dataset.id] = 'default';
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
pointcloudLoaded ++;
|
|
|
if(pointcloudLoaded == datasetLength)pointcloudLoadDone();
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
Potree.loadPanos(dataset.id, (data) => {
|
|
|
//console.log('loadPanos',dataset.sceneCode, dataset.id, data)
|
|
|
viewer.images360.addPanoData(data, dataset.id );
|
|
@@ -83810,14 +83819,14 @@ void main() {
|
|
|
data.id = e.id;
|
|
|
data.globalLocation = Potree.Utils.VectorFactory.fromArray3(e.location),
|
|
|
data.orientation = Potree.Utils.QuaternionFactory.fromArray(e.orientation);
|
|
|
- if(Potree.fileServer){
|
|
|
- data.filePath = `${Potree.settings.urls.prefix}${e.file_path}`;
|
|
|
- }else {
|
|
|
- data.filePath = `${Potree.settings.urls.prefix}/data/${Potree.settings.number}/${e.file_path}`;
|
|
|
- }
|
|
|
+ //if(Potree.fileServer){
|
|
|
+ data.filePath = `${Potree.settings.urls.prefix1}${e.file_path}`;
|
|
|
+ //}else{
|
|
|
+ // data.filePath = `${Potree.settings.urls.prefix}/data/${Potree.settings.number}/${e.file_path}`
|
|
|
+ //}
|
|
|
|
|
|
//if(!data.filePath.includes('building_1'))data.filePath = data.filePath.replace('building','building_1')//暂时
|
|
|
- data.fileName = '$DEPTH/$X/$Y.png',//e.file_name,
|
|
|
+ data.fileName = '$DEPTH/$X/$Y.png'; //e.file_name,
|
|
|
data.type = e.type,
|
|
|
data.mapSizeM = e.map_size_m,
|
|
|
data.tileSizePx = e.tile_size_px,
|
|
@@ -131732,6 +131741,7 @@ ENDSEC
|
|
|
async function loadMapEntity(datasetId, force){
|
|
|
if(!Potree.settings.floorplanEnable && !force && Potree.fileServer )return /* 等待平面图类型定义好会加载 */
|
|
|
|
|
|
+
|
|
|
let loaded = 0;
|
|
|
|
|
|
let needLoads = datasetId == 'all' ? viewer.scene.pointclouds.map(e=>e.dataset_id) : [datasetId];
|
|
@@ -131755,15 +131765,20 @@ ENDSEC
|
|
|
};
|
|
|
|
|
|
needLoads.forEach(dataset_id=>{
|
|
|
- let floorplanType = Potree.settings.floorplanType[dataset_id];
|
|
|
+ let floorplanType = Potree.settings.floorplanType[dataset_id], prefix = '';
|
|
|
+ if(!Potree.fileServer){
|
|
|
+ prefix = Potree.settings.urls.prefix;
|
|
|
+ }
|
|
|
if(!floorplanType)return
|
|
|
var path;
|
|
|
- if(Potree.fileServer){
|
|
|
- path = `/laser/tiledMap/${Potree.settings.number}/tiledMap/${floorplanType}/${dataset_id}`;
|
|
|
- }else {
|
|
|
- path = `${Potree.settings.urls.prefix2}/indoor/${Potree.settings.number}/api/tiled_maps`;
|
|
|
+ /* if(Potree.fileServer){
|
|
|
+ path = `/laser/tiledMap/${Potree.settings.number}/tiledMap/${floorplanType}/${dataset_id}`
|
|
|
+ }else{
|
|
|
+ path = `${Potree.settings.urls.prefix2}/indoor/${Potree.settings.number}/api/tiled_maps`
|
|
|
|
|
|
- }
|
|
|
+ } */
|
|
|
+ path = `${prefix}/laser/tiledMap/${Potree.settings.number}/tiledMap/${floorplanType}/${dataset_id}`;
|
|
|
+
|
|
|
Potree.settings.floorplanRequests[dataset_id] = true; //开始加载了
|
|
|
return loadFile(path, callback.bind(this, dataset_id, floorplanType) )
|
|
|
});
|