|
@@ -847,8 +847,12 @@ export function mergeEditStart(dom, mapDom, {queryCloudLonLatUrl}={}){
|
|
|
|
|
|
|
|
if(queryCloudLonLatUrl){ //点云使用其经纬度作为默认位置
|
|
if(queryCloudLonLatUrl){ //点云使用其经纬度作为默认位置
|
|
|
Potree.settings.queryCloudLonLatUrl = queryCloudLonLatUrl
|
|
Potree.settings.queryCloudLonLatUrl = queryCloudLonLatUrl
|
|
|
- Potree.loadControlPoint = /* async */function(callback,sceneCode,onError,prefix){//点云绑定地图
|
|
|
|
|
- return Potree.loadFile(queryCloudLonLatUrl.replace('{sceneCode}', sceneCode), {
|
|
|
|
|
|
|
+
|
|
|
|
|
+ Potree.loadControlPoint = function(callback,sceneCode,prop, onError){//点云绑定地图
|
|
|
|
|
+ if(queryCloudLonLatUrl instanceof Function){
|
|
|
|
|
+ queryCloudLonLatUrl = queryCloudLonLatUrl(prop)
|
|
|
|
|
+ }
|
|
|
|
|
+ return Potree.loadFile(Potree.Common.replaceAll(queryCloudLonLatUrl,'{sceneCode}', sceneCode), {
|
|
|
fetchMethod: 'post'
|
|
fetchMethod: 'post'
|
|
|
}, callback,onError)
|
|
}, callback,onError)
|
|
|
}
|
|
}
|
|
@@ -876,7 +880,7 @@ export function mergeEditStart(dom, mapDom, {queryCloudLonLatUrl}={}){
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
Potree.settings.sizeFitToLevel = true//当type为衰减模式时自动根据level调节大小。每长一级,大小就除以2
|
|
Potree.settings.sizeFitToLevel = true//当type为衰减模式时自动根据level调节大小。每长一级,大小就除以2
|
|
|
- Potree.loadPointCloudScene = function(url, type, id, title, done, onError, prefix1, prefix2 ){//对应4dkk的场景码
|
|
|
|
|
|
|
+ Potree.loadPointCloudScene = function(url, type, id, title, done, onError, prefix1, prefix2, prop ){//对应4dkk的场景码
|
|
|
let dataset , useLonLat
|
|
let dataset , useLonLat
|
|
|
let loadCloud = ({cloudPath, sceneName, sceneCode, timeStamp, color } )=>{
|
|
let loadCloud = ({cloudPath, sceneName, sceneCode, timeStamp, color } )=>{
|
|
|
|
|
|
|
@@ -948,7 +952,7 @@ export function mergeEditStart(dom, mapDom, {queryCloudLonLatUrl}={}){
|
|
|
Potree.loadControlPoint((ctlData)=>{
|
|
Potree.loadControlPoint((ctlData)=>{
|
|
|
useLonLat = ctlData.controlPoint.status==1 //设置了地理位置
|
|
useLonLat = ctlData.controlPoint.status==1 //设置了地理位置
|
|
|
load()
|
|
load()
|
|
|
- }, sceneCode, (e)=>{
|
|
|
|
|
|
|
+ }, sceneCode, prop, (e)=>{
|
|
|
console.error('loadControlPoint error',e)
|
|
console.error('loadControlPoint error',e)
|
|
|
load()
|
|
load()
|
|
|
})
|
|
})
|
|
@@ -1344,7 +1348,7 @@ export function mergeEditStart(dom, mapDom, {queryCloudLonLatUrl}={}){
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
- }, onError, prop.prefix, cloudPrefix)
|
|
|
|
|
|
|
+ }, onError, prop.prefix, cloudPrefix, prop)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|