fix:修改部分页面适配,设置地图最大最小缩放等级

This commit is contained in:
2024-10-31 14:39:01 +08:00
parent 3b65a08f56
commit 95782c60fc
8 changed files with 224 additions and 85 deletions
+4 -2
View File
@@ -2,7 +2,7 @@
* @Author: SunTao 328867980@qq.com
* @Date: 2024-10-14 10:46:23
* @LastEditors: SunTao 328867980@qq.com
* @LastEditTime: 2024-10-24 17:17:45
* @LastEditTime: 2024-10-31 13:58:48
* @FilePath: \znxjxt-ui\src\views\xj\inspection\task-management\components\fssm-map.vue
* @Description: 公共地图
-->
@@ -203,6 +203,8 @@ export default {
center: [this.centerPoint.lat, this.centerPoint.lon], //中心点经纬度
zoom: this.zoom, //图层缩放大小
projection: "EPSG:4326",
minZoom: 7,
maxZoom: 14,
}),
layers: [tianditu_vec_c, tianditu_img_c, tianditu_cva_c],
});
@@ -255,7 +257,7 @@ export default {
}
});
// 地图缩放级别事件
map.on("moveend",(e)=> {
map.on("moveend", (e) => {
const zoom = map.getView().getZoom().toFixed(); //获取当前地图的缩放级别
this.$emit("map-moveend", zoom);
});