diff --git a/src/components/site/previewOfSiteStatus.vue b/src/components/site/previewOfSiteStatus.vue index 9b25645..6548606 100644 --- a/src/components/site/previewOfSiteStatus.vue +++ b/src/components/site/previewOfSiteStatus.vue @@ -1687,6 +1687,7 @@ this.west = 180; for (var i = 0; i < clusterData.length; i++) { + cell = clusterData[i]; if (cell.lon != null && cell.lat != null) { resultwkt = "POINT(" + cell.lon + " " + cell.lat + ")"; @@ -1697,7 +1698,8 @@ feature.lat = cell.lat; feature.stName = cell.stName; feature.stCode = cell.stCode; - feature.tt = cell.tt; + feature.tt = cell.tt; //观测时间 + feature.code = cell.code; //站点行政编号 //加入ol.feautre几何属性 feature.wkt = resultwkt; //无聚簇类型图层也添加一遍 @@ -1906,13 +1908,27 @@ } //点击的是聚簇图标,展示统计信息 else { + /* console.log("点击了聚簇"+e.coordinate) */ - var centerthis = this.getCenterFromArray( + /* var centerthis = this.getCenterFromArray( feature.values_.features ); this.map.getView().setCenter([centerthis[0], centerthis[1]]); - this.map.getView().setZoom(12); + this.map.getView().setZoom(12); */ + + var cell ; + var cells = feature.values_.features; + for(var cc=0;cc