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){