hookehuyr

fix

1 <!-- 1 <!--
2 * @Date: 2025-01-22 11:40:12 2 * @Date: 2025-01-22 11:40:12
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2025-02-08 15:36:57 4 + * @LastEditTime: 2025-02-08 16:15:04
5 * @FilePath: /map-demo/src/views/mapCutter.vue 5 * @FilePath: /map-demo/src/views/mapCutter.vue
6 * @Description: 文件描述 6 * @Description: 文件描述
7 --> 7 -->
...@@ -146,7 +146,7 @@ const zoom_options = [ ...@@ -146,7 +146,7 @@ const zoom_options = [
146 const map_left_bottom_range = ref(null); // 120.583625,31.311858 146 const map_left_bottom_range = ref(null); // 120.583625,31.311858
147 const map_right_top_range = ref(null); // 120.591047,31.318265 147 const map_right_top_range = ref(null); // 120.591047,31.318265
148 148
149 -const map_center = ref(null); 149 +const map_center = ref([120.587648, 31.314616]);
150 150
151 const log_lnglat = ref('') // 获取当前地址经纬度 151 const log_lnglat = ref('') // 获取当前地址经纬度
152 152
...@@ -181,12 +181,12 @@ const handleKeydown = (e) => { // 键盘控制 ...@@ -181,12 +181,12 @@ const handleKeydown = (e) => { // 键盘控制
181 case '-': 181 case '-':
182 scaleImage(0.99) 182 scaleImage(0.99)
183 break 183 break
184 - case 'r': 184 + // case 'r':
185 - rotateMap(10) 185 + // rotateMap(10)
186 - break 186 + // break
187 - case 'R': 187 + // case 'R':
188 - rotateMap(-10) 188 + // rotateMap(-10)
189 - break 189 + // break
190 } 190 }
191 } 191 }
192 } 192 }
...@@ -205,7 +205,7 @@ function loadMap() { ...@@ -205,7 +205,7 @@ function loadMap() {
205 map.value = new AMap.Map('map-container', { 205 map.value = new AMap.Map('map-container', {
206 zoom: 17, 206 zoom: 17,
207 zooms: zooms.value, 207 zooms: zooms.value,
208 - center: [120.587648, 31.314616], 208 + center: map_center.value,
209 rotation: 0, // 初始地图角度 209 rotation: 0, // 初始地图角度
210 layers: [ 210 layers: [
211 new AMap.TileLayer.RoadNet(), 211 new AMap.TileLayer.RoadNet(),
......