|
@@ -617,11 +617,21 @@ export default {
|
|
|
// home页面下拉框
|
|
|
homeSelect(val) {
|
|
|
console.log(val, "current street");
|
|
|
- this.$refs.mapLoaderRef.setView(streetLocationMap.get(val), 11);
|
|
|
+ if (val === "全部") {
|
|
|
+ this.$refs.mapLoaderRef.setView(townLocationMap.get(val), 10);
|
|
|
+ } else {
|
|
|
+ let polygon = townPolygonMap.get(val);
|
|
|
+ map2DViewer.map.fitBounds(polygon.getBounds());
|
|
|
+ }
|
|
|
},
|
|
|
// 镇域专题下拉框
|
|
|
specialTownSelect(val) {
|
|
|
- this.$refs.mapLoaderRef.setView(streetLocationMap.get(val), 11);
|
|
|
+ if (val === "全部") {
|
|
|
+ this.$refs.mapLoaderRef.setView(townLocationMap.get(val), 10);
|
|
|
+ } else {
|
|
|
+ let polygon = townPolygonMap.get(val);
|
|
|
+ map2DViewer.map.fitBounds(polygon.getBounds());
|
|
|
+ }
|
|
|
},
|
|
|
},
|
|
|
created() {
|