|
@@ -63,8 +63,27 @@ export const enter = ({ dom, mapDom, isLocal, lonlat, scenes, laserRoot, laserOS
|
|
|
Potree.settings.urls.prefix = Potree.settings.urls.prefix7
|
|
|
Potree.settings.webSite = 'datav1'
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+ if(window.offline){//离线版
|
|
|
+ /* Potree.settings.urls.templates = {
|
|
|
+ depthTex : 'swss/{sceneCode}/www/{sceneCode}/wwwroot/{sceneCode}/data/{sceneCode}/depthmap',
|
|
|
+ vision : '/swkk/{sceneCode}/wwwroot/scene_view_data/{sceneCode}/images/vision.txt'
|
|
|
+ } */
|
|
|
+ Potree.fileStorage = {
|
|
|
+ get(url){
|
|
|
+ return new Promise(async function(resolve,reject){
|
|
|
+ let data = await window.offlineData[url]
|
|
|
+ if(data){
|
|
|
+ resolve(data)
|
|
|
+ }else{
|
|
|
+ console.error('没找到',url)
|
|
|
+ reject()
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
if(laserRoot != void 0){
|
|
|
laserRoot.slice(-1) == '/' && (laserRoot = laserRoot.slice(0,-1)) //去掉最后一个'/'
|
|
|
Potree.settings.urls.prefix = laserRoot
|