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]), + }, + ], } ) })