|
|
|
@ -1921,6 +1921,8 @@ MainMap_QM.prototype = { |
|
|
|
*/ |
|
|
|
changeMapState: function (state) { |
|
|
|
Map_QM.controls.reset(); |
|
|
|
let angle = Map_QM.util.options.deviceAng ? Map_QM.util.deviceObj.angle : Map_QM.util.mapAngle |
|
|
|
Map_QM.rotationAngle(angle) |
|
|
|
if (state === "3d") { |
|
|
|
Map_QM.camera = Map_QM.cameraPerspective; |
|
|
|
Map_QM.controls.object = Map_QM.camera; |
|
|
|
@ -2184,6 +2186,8 @@ MainMap_QM.prototype = { |
|
|
|
Map_QM.controls.object = Map_QM.camera; |
|
|
|
Map_QM.shawLight.castShadow = Map_QM.util.options.shadow; |
|
|
|
Map_QM.controls.reset(); |
|
|
|
let angle = Map_QM.util.options.deviceAng ? Map_QM.util.deviceObj.angle : Map_QM.util.mapAngle |
|
|
|
Map_QM.rotationAngle(angle) |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
@ -2269,6 +2273,8 @@ MainMap_QM.prototype = { |
|
|
|
this.controls.maxAzimuthAngle = Infinity; |
|
|
|
this.shawLight.castShadow = this.util.options.shadow; |
|
|
|
this.controls.reset(); |
|
|
|
let angle = this.util.options.deviceAng ? this.util.deviceObj.angle : this.util.mapAngle |
|
|
|
this.rotationAngle(angle) |
|
|
|
}, |
|
|
|
/** |
|
|
|
* @api {方法} changePathDir(pathState) 切换导航方向 |
|
|
|
@ -2640,7 +2646,9 @@ MainMap_QM.prototype = { |
|
|
|
* |
|
|
|
*/ |
|
|
|
rotationAngle: function (angle) { |
|
|
|
Map_QM.controls.setRotateHorizontal(angle / 180 * Math.PI); |
|
|
|
if(Math.abs(parseInt(angle)+Map_QM.controls.getRotateHorizontal()*180/Math.PI)>5){ |
|
|
|
Map_QM.controls.setRotateHorizontal((angle / 180) * Math.PI) |
|
|
|
} |
|
|
|
}, |
|
|
|
/** |
|
|
|
* @api {方法} rotateAngle(angle) 改变垂直角度 |
|
|
|
@ -3170,6 +3178,8 @@ MainMap_QM.prototype = { |
|
|
|
clearTimeout(shopTime); |
|
|
|
isJUZ = false; |
|
|
|
Map_QM.controls.reset() |
|
|
|
let angle = Map_QM.util.options.deviceAng ? Map_QM.util.deviceObj.angle : Map_QM.util.mapAngle |
|
|
|
Map_QM.rotationAngle(angle) |
|
|
|
}, 3000); |
|
|
|
} |
|
|
|
if (debug) { |
|
|
|
|