Pārlūkot izejas kodu

优化地图视角参数

彭宇 2 nedēļas atpakaļ
vecāks
revīzija
487dfcfcd0
1 mainītis faili ar 3 papildinājumiem un 3 dzēšanām
  1. 3 3
      src/components/supermap-2.5d.vue

+ 3 - 3
src/components/supermap-2.5d.vue

@@ -1305,7 +1305,7 @@ export default {
       let that = this
       setTimeout(function() {
         that.viewer.camera.setView({
-          destination: new SuperMap3D.Cartesian3.fromDegrees(Number(longitude)+Number(0.2), Number(latitude)-Number(1.3), Number(140000)),
+          destination: new SuperMap3D.Cartesian3.fromDegrees(Number(longitude)+Number(0.1), Number(latitude)-Number(1.3), Number(140000)),
           orientation: {
             heading:  SuperMap3D.Math.toRadians(0),
             pitch:  SuperMap3D.Math.toRadians(-45),
@@ -1409,10 +1409,10 @@ export default {
     dropLocation(lat, lng, index,radius) {
       this.viewer.scene.globe.depthTestAgainstTerrain = true;
       this.viewer.camera.flyTo({
-        destination: new SuperMap3D.Cartesian3.fromDegrees(lng, lat, 3000),
+        destination: new SuperMap3D.Cartesian3.fromDegrees(Number(lng), Number(lat)-Number(1.3), Number(140000)),
         orientation: {
           heading:  SuperMap3D.Math.toRadians(0),
-          pitch:  SuperMap3D.Math.toRadians(-90),
+          pitch:  SuperMap3D.Math.toRadians(-45),
           roll: 0
         }
       })