|
|
|
@ -503,16 +503,6 @@ export default {
|
|
|
|
|
// console.log(o.getCenter())
|
|
|
|
|
// console.log(this.map,'initMapinitMap');
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
// 获取网格数据
|
|
|
|
|
this.getWanggeGeoJson();
|
|
|
|
|
// 获取围栏数据
|
|
|
|
|
this.getWeilanGeoJson();
|
|
|
|
|
// 获取重点区域数据
|
|
|
|
|
this.getQuyuGeoJson();
|
|
|
|
|
// 获取重点路段数据
|
|
|
|
|
this.getLuduanGeoJson();
|
|
|
|
|
// 获取点位
|
|
|
|
|
this.getMarkers(1);
|
|
|
|
|
AMap.plugin('AMap.GeoJSON',()=>{
|
|
|
|
|
let polygon
|
|
|
|
|
var geojson = new AMap.GeoJSON({
|
|
|
|
@ -530,6 +520,16 @@ export default {
|
|
|
|
|
map.add(geojson)
|
|
|
|
|
map.setFitView(polygon);
|
|
|
|
|
})
|
|
|
|
|
// 获取网格数据
|
|
|
|
|
this.getWanggeGeoJson();
|
|
|
|
|
// 获取围栏数据
|
|
|
|
|
this.getWeilanGeoJson();
|
|
|
|
|
// 获取重点区域数据
|
|
|
|
|
this.getQuyuGeoJson();
|
|
|
|
|
// 获取重点路段数据
|
|
|
|
|
this.getLuduanGeoJson();
|
|
|
|
|
// 获取点位
|
|
|
|
|
this.getMarkers(1);
|
|
|
|
|
});
|
|
|
|
|
// console.log(this.$refs.map.$$getInstance(),'TTTTTTT')
|
|
|
|
|
},
|
|
|
|
@ -1015,8 +1015,8 @@ export default {
|
|
|
|
|
'white-space': 'nowrap',
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
this.map.add(wangge);
|
|
|
|
|
this.map.add(text);
|
|
|
|
|
this.map.add([wangge,text]);
|
|
|
|
|
// this.map.add(text);
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
@ -1052,8 +1052,8 @@ export default {
|
|
|
|
|
'white-space': 'nowrap',
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
this.map.add(circle);
|
|
|
|
|
this.map.add(text);
|
|
|
|
|
this.map.add([circle,text]);
|
|
|
|
|
// this.map.add(text);
|
|
|
|
|
// 多边形围栏
|
|
|
|
|
} else if (shapeStr.features[0].geometry.type == "Polygon") {
|
|
|
|
|
var wangge = new AMap.Polygon({
|
|
|
|
@ -1081,8 +1081,8 @@ export default {
|
|
|
|
|
'white-space': 'nowrap',
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
this.map.add(wangge);
|
|
|
|
|
this.map.add(text);
|
|
|
|
|
this.map.add([wangge,text]);
|
|
|
|
|
// this.map.add(text);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
@ -1114,8 +1114,8 @@ export default {
|
|
|
|
|
'white-space': 'nowrap',
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
this.map.add(quyu);
|
|
|
|
|
this.map.add(text);
|
|
|
|
|
this.map.add([quyu,text]);
|
|
|
|
|
// this.map.add(text);
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
@ -1146,8 +1146,8 @@ export default {
|
|
|
|
|
'white-space': 'nowrap',
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
this.map.add(luduan);
|
|
|
|
|
this.map.add(text);
|
|
|
|
|
this.map.add([luduan,text]);
|
|
|
|
|
// this.map.add(text);
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|