From fe80ed086415f542f13f8a1a860601a2a23a1f6f Mon Sep 17 00:00:00 2001 From: little4 <360013221@qq.com> Date: Thu, 17 Oct 2024 17:43:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=BB=86=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/Home/components/RoadAndEvents/utils/map.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js index 0643b380..f0c1b310 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js @@ -62,9 +62,8 @@ export class MarkerCluster { // e.extData.latitude = lnglat[1]; //}); marksAddInGraph(_data); - if (!_data) return; - if (!Array.isArray(data)) data = [_data]; + if (!Array.isArray(_data)) _data = [_data]; this.refreshLayer(_id, _data); } @@ -118,11 +117,11 @@ export class MarkerCluster { this.dataInfo[_id] = _data; this.data.push(..._data); if(aryPoints.length > 0){ - map2d.addPointByArr( + Vue.prototype.mapIns.addPointByArr( {pointList:aryPoints}, // 点位数据数组(按以下规范组装) _id, // jhlayers 当前添加的数据 唯一标识(删除该图层时也会用到)//./事件专题/交通事故.svg true // 当前新加图层是否启用聚合效果 - ); + ); console.log(aryPoints,_id,'点位数组') } if(Vue.prototype.isMapStatck){