From 0123f10d8242566f22f941a5e10d8e91a0e752c3 Mon Sep 17 00:00:00 2001 From: yaoyuhao Date: Mon, 30 Sep 2024 15:51:35 +0800 Subject: [PATCH 1/2] ceshi --- src/view/echart_analyze/map.vue | 3 +++ src/view/sy_map.vue | 13 +++++++++++++ 2 files changed, 16 insertions(+) diff --git a/src/view/echart_analyze/map.vue b/src/view/echart_analyze/map.vue index 543d336..914de0f 100644 --- a/src/view/echart_analyze/map.vue +++ b/src/view/echart_analyze/map.vue @@ -20,6 +20,9 @@ const initMap = () => { let type = tools.data.get("type"); if (type == 1) { + map.setMapStyleV2({ + styleId: "d0acde891abd157741b71e12670ee2e6", + }); } else { map.setMapStyleV2({ styleId: "d0acde891abd157741b71e12670ee2e6", diff --git a/src/view/sy_map.vue b/src/view/sy_map.vue index 9a5ef2d..2b1c087 100644 --- a/src/view/sy_map.vue +++ b/src/view/sy_map.vue @@ -1074,12 +1074,24 @@ const pagination = reactive({ }); //--------定义方法---------------------------------------- //地图初始化 +var styleJson = [ + { featureType: "label", elementType: "all", stylers: { visibility: "off" } }, + { + featureType: "boundary", + elementType: "all", + stylers: { visibility: "off" }, + }, + { featureType: "road", elementType: "all", stylers: { visibility: "off" } }, + { featureType: "water", elementType: "all", stylers: { visibility: "off" } }, + { featureType: "land", elementType: "all", stylers: { visibility: "off" } }, +]; const totalType = ref(2); const initMap = () => { map = new BMapGL.Map("map", { minZoom: 8, maxZoom: 20 }); let type = tools.data.get("type"); if (type == 1) { totalType.value = 1; + map.setMapStyleV2({ styleJson: styleJson }); } else { totalType.value = 2; map.setMapType(BMAP_SATELLITE_MAP); @@ -4941,6 +4953,7 @@ onMounted(async () => { } } } +//蒙版 .btns { z-index: 999; position: absolute; From 33c9ca274f44fd7c1f2b74cccd65223d3e71995d Mon Sep 17 00:00:00 2001 From: yaoyuhao Date: Mon, 30 Sep 2024 16:18:16 +0800 Subject: [PATCH 2/2] 1 --- src/view/echart_analyze/map.vue | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/view/echart_analyze/map.vue b/src/view/echart_analyze/map.vue index 914de0f..bedf6a8 100644 --- a/src/view/echart_analyze/map.vue +++ b/src/view/echart_analyze/map.vue @@ -20,9 +20,7 @@ const initMap = () => { let type = tools.data.get("type"); if (type == 1) { - map.setMapStyleV2({ - styleId: "d0acde891abd157741b71e12670ee2e6", - }); + } else { map.setMapStyleV2({ styleId: "d0acde891abd157741b71e12670ee2e6",