From b1c04e5f31abdab0bb664e84cfd9916b9d4516dc Mon Sep 17 00:00:00 2001 From: a0049873 <79py69t9wb@privaterelay.appleid.com> Date: Tue, 2 Aug 2022 17:59:47 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B6=8B=E5=8A=BF=E7=AB=99=E7=82=B9=20=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=20=20=E5=B4=82=E5=B1=B1=E5=8C=BA=20=20?= =?UTF-8?q?=E6=9D=8E=E6=B2=A7=E5=8C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/src/views/home/mapTest/index.vue | 101 +++++++++++++++++++++++-- 1 file changed, 95 insertions(+), 6 deletions(-) diff --git a/front/src/views/home/mapTest/index.vue b/front/src/views/home/mapTest/index.vue index 73300ce4..1d0ba2f0 100644 --- a/front/src/views/home/mapTest/index.vue +++ b/front/src/views/home/mapTest/index.vue @@ -93,7 +93,7 @@ // name: '市南区', // code: 'shinan', // className: 'classsn', - // value: 0, + // value: 1, // }, { name: '市北区', @@ -117,13 +117,13 @@ name: '李沧区', code: 'licang', className: 'classlc', - value: 0, + value: 0.2, }, { name: '城阳区', code: 'chengyang', className: 'classcy', - value: 0, + value: 0.2, }, { name: '即墨区', @@ -322,7 +322,12 @@ let res = [] for (let i = 0; i < data.length; i++) { let dataItem = data[i] - if (dataItem.name === '西海岸' || dataItem.name === '崂山区') { + if ( + dataItem.name === '西海岸' || + dataItem.name === '崂山区' || + dataItem.name === '李沧区' || + dataItem.name === '城阳区' + ) { let fromCoord = geoCoordMap[dataItem.name] let toCoord = [120.364482, 36.065671] if (fromCoord && toCoord) { @@ -344,7 +349,12 @@ let res = [] for (let i = 0; i < data.length; i++) { let dataItem = data[i] - if (dataItem.name === '西海岸' || dataItem.name === '崂山区') { + if ( + dataItem.name === '西海岸' || + dataItem.name === '崂山区' || + dataItem.name === '李沧区' || + dataItem.name === '城阳区' + ) { let fromCoord = [120.364482, 36.065671] let toCoord = geoCoordMap[dataItem.name] if (fromCoord && toCoord) { @@ -366,7 +376,12 @@ let res = [] for (let i = 0; i < data.length; i++) { let dataItem = data[i] - if (dataItem.name !== '西海岸' && dataItem.name !== '崂山区') { + if ( + dataItem.name !== '西海岸' && + dataItem.name !== '崂山区' && + dataItem.name !== '李沧区' && + dataItem.name !== '城阳区' + ) { let fromCoord = [120.364482, 36.065671] let toCoord = geoCoordMap[dataItem.name] if (fromCoord && toCoord) { @@ -599,6 +614,80 @@ value: geoCoordMap['崂山区'].concat([10]), }, ], + }, + { + type: 'scatter', + coordinateSystem: 'geo', + zlevel: 2, + rippleEffect: { + period: 4, + brushType: 'stroke', + scale: 4, + }, + label: { + normal: { + show: true, + position: 'bottom', + //offset:[5, 0], + color: '#fbd500', + formatter: '{b}', + textStyle: { + color: '#fbd500', + fontSize: 18, + fontWeight: 600, + }, + }, + emphasis: { + show: true, + color: '#f60', + }, + }, + symbol: 'image://' + require('@/assets/home/yb.png'), + symbolSize: 40, + symbolOffset: [0, -20], + data: [ + { + name: '城阳区', + value: geoCoordMap['城阳区'].concat([10]), + }, + ], + }, + { + type: 'scatter', + coordinateSystem: 'geo', + zlevel: 2, + rippleEffect: { + period: 4, + brushType: 'stroke', + scale: 4, + }, + label: { + normal: { + show: true, + position: 'bottom', + //offset:[5, 0], + color: '#fbd500', + formatter: '{b}', + textStyle: { + color: '#fbd500', + fontSize: 18, + fontWeight: 600, + }, + }, + emphasis: { + show: true, + color: '#f60', + }, + }, + symbol: 'image://' + require('@/assets/home/yb.png'), + symbolSize: 40, + symbolOffset: [0, -20], + data: [ + { + name: '李沧区', + value: geoCoordMap['李沧区'].concat([10]), + }, + ], } ) })