|
@@ -1142,7 +1142,9 @@ export const enter = ({ dom, mapDom, isLocal, lonlat, scenes, laserRoot, laserOS
|
|
|
bus,
|
|
bus,
|
|
|
model,
|
|
model,
|
|
|
getDefaultRotation,
|
|
getDefaultRotation,
|
|
|
-
|
|
|
|
|
|
|
+ getDefaultPosition(){
|
|
|
|
|
+ return model.lonLatPos || new THREE.Vector3(0,0, model.zOnGround || 0)
|
|
|
|
|
+ },
|
|
|
supportPano() { //是否支持全景图
|
|
supportPano() { //是否支持全景图
|
|
|
return model?.panos?.length > 0
|
|
return model?.panos?.length > 0
|
|
|
},
|
|
},
|
|
@@ -1247,12 +1249,12 @@ export const enter = ({ dom, mapDom, isLocal, lonlat, scenes, laserRoot, laserOS
|
|
|
},
|
|
},
|
|
|
changePosition(pos) {//校准取消时执行
|
|
changePosition(pos) {//校准取消时执行
|
|
|
//console.log('changePosition', model.name, pos.x, pos.y, pos.z)
|
|
//console.log('changePosition', model.name, pos.x, pos.y, pos.z)
|
|
|
- if(pos.x == 0 && pos.y == 0 && pos.z == 0 && model.lonLatPos ){
|
|
|
|
|
|
|
+ /* if(pos.x == 0 && pos.y == 0 && pos.z == 0 && model.lonLatPos ){
|
|
|
model && model.position.copy(model.lonLatPos)
|
|
model && model.position.copy(model.lonLatPos)
|
|
|
console.log('changePosition 使用经纬度坐标', model.name )
|
|
console.log('changePosition 使用经纬度坐标', model.name )
|
|
|
- }else{
|
|
|
|
|
|
|
+ }else{ */
|
|
|
model && model.position.copy(pos)
|
|
model && model.position.copy(pos)
|
|
|
- }
|
|
|
|
|
|
|
+ //}
|
|
|
model.dispatchEvent({ type: 'position_changed'/* , byControl:true */})
|
|
model.dispatchEvent({ type: 'position_changed'/* , byControl:true */})
|
|
|
},
|
|
},
|
|
|
changeRotation(rot) {//校准取消时执行
|
|
changeRotation(rot) {//校准取消时执行
|