Bella 2 роки тому
батько
коміт
ba5545e974
2 змінених файлів з 5 додано та 5 видалено
  1. 3 3
      src/components/map/MapHolder.vue
  2. 2 2
      src/views/HomeView.vue

+ 3 - 3
src/components/map/MapHolder.vue

@@ -753,7 +753,7 @@ export default {
         if (this.$store.state.homeSpecialTown === "全部") {
           this.setView(
             townLocationMap.get(this.$store.state.homeSpecialTown),
-            3
+            1
           );
         } else {
           let polygon = townPolygonMap.get(this.$store.state.homeSpecialTown);
@@ -766,7 +766,7 @@ export default {
           let locationArr = townLocationMap.get(
             this.$store.state.homeSpecialTown
           );
-          this.setView([locationArr[0], locationArr[1] + 0.15], 3);
+          this.setView([locationArr[0], locationArr[1] + 0.15], 1);
         } else {
           let locationArr = townLocationMap.get(
             this.$store.state.homeSpecialTown
@@ -786,7 +786,7 @@ export default {
         if (this.$store.state.homeSpecialTown === "全部") {
           this.setView(
             townLocationMap.get(this.$store.state.homeSpecialTown),
-            3
+            1
           );
         } else {
           let polygon = townPolygonMap.get(this.$store.state.homeSpecialTown);

+ 2 - 2
src/views/HomeView.vue

@@ -374,7 +374,7 @@ export default {
     homeSelect(val) {
       this.$store.commit("changeHomeSpecialTown", val);
       if (val === "全部") {
-        this.$refs.mapLoaderRef.setView(townLocationMap.get(val), 3);
+        this.$refs.mapLoaderRef.setView(townLocationMap.get(val), 1);
       } else {
         let polygon = townPolygonMap.get(val);
         map2DViewer.map.fitBounds(polygon.getBounds());
@@ -387,7 +387,7 @@ export default {
         let locationArr = townLocationMap.get(val);
         this.$refs.mapLoaderRef.setView(
           [locationArr[0], locationArr[1] + 0.15],
-          3
+          1
         );
       } else {
         let polygon = townPolygonMap.get(val);