Browse Source

fix: queryCloudLonLatUrl

xzw 2 months ago
parent
commit
30aabc65e3
3 changed files with 12 additions and 7 deletions
  1. 8 3
      public/lib/potree/potree.js
  2. 1 1
      public/lib/potree/potree.js.map
  3. 3 3
      src/sdk/cover/index.js

+ 8 - 3
public/lib/potree/potree.js

@@ -24828,15 +24828,19 @@
 	  EditCloudsArgs && Potree.loadPanosCloudStart(EditCloudsArgs);
 	}
 	function mergeEditStart(dom, mapDom) {
+	  var {
+	    queryCloudLonLatUrl
+	  } = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
 	  Potree.settings.editType = 'merge';
 	  Potree.settings.intersectOnObjs = true;
 	  Potree.settings.boundAddObjs = true;
 	  Potree.settings.unableNavigate = true;
-	  if (Potree.settings.queryCloudLonLatUrl) {
+	  if (queryCloudLonLatUrl) {
 	    //点云使用其经纬度作为默认位置
+	    Potree.settings.queryCloudLonLatUrl = queryCloudLonLatUrl;
 	    Potree.loadControlPoint = /* async  */function (callback, sceneCode, onError, prefix) {
 	      //点云绑定地图 
-	      return Potree.loadFile(Potree.settings.queryCloudLonLatUrl.replace('{sceneCode}', sceneCode), {
+	      return Potree.loadFile(queryCloudLonLatUrl.replace('{sceneCode}', sceneCode), {
 	        fetchMethod: 'post'
 	      }, callback, onError);
 	    };
@@ -25008,7 +25012,8 @@
 	  Potree.addModel = function (prop, done, onProgress, onError) {
 	    var _prop$raw, _prop$raw2, _prop$raw3;
 	    //加载模型
-	    var fromNew = ((_prop$raw = prop.raw) === null || _prop$raw === void 0 ? void 0 : _prop$raw.convertType) && model.fileType == '3dtiles' && (((_prop$raw2 = prop.raw) === null || _prop$raw2 === void 0 ? void 0 : _prop$raw2.wgs84) || ((_prop$raw3 = prop.raw) === null || _prop$raw3 === void 0 ? void 0 : _prop$raw3.gcj02));
+
+	    var fromNew = ((_prop$raw = prop.raw) === null || _prop$raw === void 0 ? void 0 : _prop$raw.convertType) && prop.type == '3dtiles' && (((_prop$raw2 = prop.raw) === null || _prop$raw2 === void 0 ? void 0 : _prop$raw2.wgs84) || ((_prop$raw3 = prop.raw) === null || _prop$raw3 === void 0 ? void 0 : _prop$raw3.gcj02));
 	    var loadDone = model => {
 	      model.dataset_id = prop.id; //唯一标识
 

File diff suppressed because it is too large
+ 1 - 1
public/lib/potree/potree.js.map


+ 3 - 3
src/sdk/cover/index.js

@@ -163,10 +163,10 @@ export const enter = ({ dom, mapDom, isLocal, lonlat, scenes, laserRoot, laserOS
     window.cesErrorCallback = ()=>{
         //sdk.setBackdrop('none')
     }
-    //Potree.settings.queryCloudLonLatUrl = "/laser/4dage/{sceneCode}/getDataSetAndControlPoint"
-    Potree.settings.queryCloudLonLatUrl = Potree.settings.urls.prefix+"/laser/4dage/{sceneCode}/getDataSetAndControlPoint"
    
-    let { THREE } = Potree.mergeEditStart(dom, mapDom)
+    let { THREE } = Potree.mergeEditStart(dom, mapDom, {
+        queryCloudLonLatUrl:Potree.settings.urls.prefix+"/laser/4dage/{sceneCode}/getDataSetAndControlPoint"  
+    })
     let {MergeEditor, AnimationEditor} = viewer.modules