Browse Source

优化地图标记功能与性能

彭宇 2 weeks ago
parent
commit
8897f9769c
2 changed files with 9 additions and 5 deletions
  1. 7 2
      src/components/supermap-2.5d.vue
  2. 2 3
      src/views/SenEquipmentCenter.vue

+ 7 - 2
src/components/supermap-2.5d.vue

@@ -1307,7 +1307,7 @@ export default {
         that.viewer.camera.setView({
           destination: new SuperMap3D.Cartesian3.fromDegrees(Number(longitude), Number(latitude), Number(height)),
           orientation: {
-            heading:  SuperMap3D.Math.toRadians(35),
+            heading:  SuperMap3D.Math.toRadians(0),
             pitch:  SuperMap3D.Math.toRadians(-45),
             roll: 0
           }
@@ -1409,7 +1409,12 @@ 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(lng, lat, 3000),
+        orientation: {
+          heading:  SuperMap3D.Math.toRadians(0),
+          pitch:  SuperMap3D.Math.toRadians(-90),
+          roll: 0
+        }
       })
       if (radius != undefined && radius != null) {
         let that = this

+ 2 - 3
src/views/SenEquipmentCenter.vue

@@ -210,9 +210,8 @@
 						}
 						setTimeout(() => {
 							this.$refs.supermap.clearM();
-							this.$refs.supermap.clearMRadius();
-							this.$refs.supermap.setMarkersRadius(deviceMarkersList);
-						}, 1000);
+							this.$refs.supermap.setMarkers(deviceMarkersList);
+						}, 3000);
 					} else {
 						setTimeout(() => {
 							this.$refs.supermap.clearM();