From c05ed0616ccc5028a5142dc03a6687d6f611af08 Mon Sep 17 00:00:00 2001 From: chenchenzai Date: Tue, 22 Nov 2022 17:30:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E5=BC=B9=E7=AA=97=E5=8C=85?= =?UTF-8?q?=E5=90=AB=E8=A7=86=E9=A2=91=E6=95=B0=E6=8D=AE=E6=95=B0=E7=BB=84?= =?UTF-8?q?=E6=B8=85=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/src/supermap/advance-init.js | 2 +- front/src/supermap/map-showResource.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/front/src/supermap/advance-init.js b/front/src/supermap/advance-init.js index ef06a789..7e90c4e3 100644 --- a/front/src/supermap/advance-init.js +++ b/front/src/supermap/advance-init.js @@ -1678,7 +1678,6 @@ export function MapFun(mapObj) { _removeLayerByLayerName(layerName) let selectedLayerList = []; let layers = null; - let clickDataList = []; // 判断是否是聚合图层 layers = createMarkerClusterLayer('', map) const icon1 = createDefaultFeatureStyle({ @@ -1734,6 +1733,7 @@ export function MapFun(mapObj) { // }) // } marker.on('click', e => { + let clickDataList = []; //console.log('点位数据', e) //console.log('点位数据1', e.sourceTarget.resourceData) clickDataList.push(e.sourceTarget.resourceData); diff --git a/front/src/supermap/map-showResource.js b/front/src/supermap/map-showResource.js index 3aab1872..f7d3708f 100644 --- a/front/src/supermap/map-showResource.js +++ b/front/src/supermap/map-showResource.js @@ -83,9 +83,9 @@ function createMarkerClusterLayer(layerClassName, mapObj) { maxClusterRadius: 80, }) markerClusterLayer.on('clusterclick', function(a) { + let clusterList = []; //console.log('cluster ' + a.layer.getAllChildMarkers()); if (a.layer.getAllChildMarkers().length < 50) { - let clusterList = []; for (var i = 0; i < a.layer.getAllChildMarkers().length; i++) { //console.log('yyyyyyyyy', a.layer.getAllChildMarkers()[i].resourceData); //console.log('yyyyyyyyy', a.layer.getAllChildMarkers()[i].fData);