diff --git a/public/static/offline/JSON/GetDevCoordinateByIP.json b/public/static/offline/JSON/GetDevCoordinateByIP.json index 7b56bba..4d8fc37 100644 --- a/public/static/offline/JSON/GetDevCoordinateByIP.json +++ b/public/static/offline/JSON/GetDevCoordinateByIP.json @@ -16,7 +16,7 @@ "ip": "192.168.1.209", "mac": "4CEDFBCAFF27", "location": "30", - "angle": "0", + "angle": "90", "projectCode": "project-n-ww5jvpwnu0ads70lbkda" } } diff --git a/public/static/qm/MainMap_QM.js b/public/static/qm/MainMap_QM.js index c2dfc40..78fb1ed 100644 --- a/public/static/qm/MainMap_QM.js +++ b/public/static/qm/MainMap_QM.js @@ -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) {