|
|
@@ -691,31 +691,36 @@ export default {
|
|
|
this.yjdpShow = !this.yjdpShow
|
|
|
if (this.yjdpShow) {
|
|
|
|
|
|
- // fetch("./static/data/test.geojson")
|
|
|
- // .then(response => response.json())
|
|
|
- // .then(function (result) {
|
|
|
- // console.log(result);
|
|
|
- // let feat = {type: 'FeatureCollection', features: []}
|
|
|
- // let feat2 = {type: 'FeatureCollection', features: []}
|
|
|
- // let feat3 = {type: 'FeatureCollection', features: []}
|
|
|
- // result.features.forEach(e => {
|
|
|
- // let fet = {geometry:{},properties:{},type: "Feature"}
|
|
|
- // fet.geometry = e.geometry;
|
|
|
- // let prop = {}
|
|
|
- // prop["街镇"]=e.properties.street;
|
|
|
- // prop["道路名称"]=e.properties.road;
|
|
|
- // prop["地址"]=e.properties.address;
|
|
|
- // prop["uuid"]=that.generateUUID();
|
|
|
- // // prop["店铺类型"]=e.properties.type == '#N/A' ? e.properties["大类"] : e.properties.type;
|
|
|
- // prop["店铺名称"]=e.properties.name;
|
|
|
- // // prop["大类"]=e.properties["大类"];
|
|
|
- // prop["店铺类型"] =e.properties["大类"].split("、")[0];
|
|
|
- // fet.properties= prop;
|
|
|
- // feat.features.push(fet);
|
|
|
- // });
|
|
|
- // console.log(feat);
|
|
|
- // }
|
|
|
- // )
|
|
|
+ fetch("./static/data/test.geojson")
|
|
|
+ .then(response => response.json())
|
|
|
+ .then(function (result) {
|
|
|
+ console.log(result);
|
|
|
+ let feat = {type: 'FeatureCollection', features: []}
|
|
|
+ let feat2 = {type: 'FeatureCollection', features: []}
|
|
|
+ let feat3 = {type: 'FeatureCollection', features: []}
|
|
|
+ let arr = []
|
|
|
+ result.features.forEach(e => {
|
|
|
+ let fet = {geometry:{},properties:{},type: "Feature"}
|
|
|
+ fet.geometry = e.geometry;
|
|
|
+ let prop = {}
|
|
|
+ prop["街镇"]=e.properties.street;
|
|
|
+ prop["道路名称"]=e.properties.road;
|
|
|
+ prop["地址"]=e.properties.address;
|
|
|
+ prop["uuid"]=that.generateUUID();
|
|
|
+ // prop["店铺类型"]=e.properties.type == '#N/A' ? e.properties["大类"] : e.properties.type;
|
|
|
+ prop["店铺名称"]=e.properties.name;
|
|
|
+ // prop["大类"]=e.properties["大类"];
|
|
|
+ prop["店铺类型"] =e.properties["大类"].split("、")[0];
|
|
|
+ arr.push(e.properties["大类"].split("、")[0])
|
|
|
+
|
|
|
+ fet.properties= prop;
|
|
|
+ feat.features.push(fet);
|
|
|
+ });
|
|
|
+ const uniqueArray = [...new Set(arr)]
|
|
|
+ console.log(uniqueArray);
|
|
|
+ console.log(feat);
|
|
|
+ }
|
|
|
+ )
|
|
|
|
|
|
// 添加
|
|
|
fetch("./static/data/沿街店铺-20251029.geojson")
|
|
|
@@ -929,8 +934,6 @@ export default {
|
|
|
},
|
|
|
// 热力图列表展示-MB
|
|
|
handleOpenHeatmapPanelShowMb(){
|
|
|
- console.log(111);
|
|
|
-
|
|
|
this.layerInfoDrawerShow = false
|
|
|
if(this.heatInfoDrawerShow){
|
|
|
this.heatInfoDrawerShow = false
|
|
|
@@ -950,7 +953,6 @@ export default {
|
|
|
},
|
|
|
// 图层列表展示-MB
|
|
|
handleOpenLayerPanelShowMB(){
|
|
|
- console.log(2222);
|
|
|
this.heatInfoDrawerShow = false
|
|
|
if(this.layerInfoDrawerShow){
|
|
|
this.layerInfoDrawerShow = false
|
|
|
@@ -998,10 +1000,15 @@ export default {
|
|
|
addHeatMapLayer(judge, params) {
|
|
|
let that = this;
|
|
|
if (judge) {
|
|
|
- fetch(params.url)
|
|
|
+ // fetch(params.url)
|
|
|
+ fetch("./static/data/沿街店铺-20251029.geojson")
|
|
|
.then(response => response.json())
|
|
|
.then(function (result) {
|
|
|
- let arr = result.features.map(function (item) {
|
|
|
+ // 过滤空店铺数据
|
|
|
+ result=result.features.filter(person =>
|
|
|
+ person.properties['店铺类型'] == params.alias
|
|
|
+ );
|
|
|
+ let arr = result.map(function (item) {
|
|
|
let coor = item.geometry.coordinates
|
|
|
return {
|
|
|
x: coor[0],
|