|
@@ -55,7 +55,7 @@
|
|
|
:zooms="mapDiyObj.zooms"
|
|
|
:mapStyle="mapDiyObj.mapStyle"
|
|
|
:center="mapDiyObj.center"
|
|
|
- :events="events"
|
|
|
+ :events="mapEvents"
|
|
|
:plugin="plugin"
|
|
|
>
|
|
|
<el-amap-marker class="scoped-m-box" v-for="(marker, index) in {...schoolList}" :key="3000 + index"
|
|
@@ -63,7 +63,7 @@
|
|
|
:position="marker.position"
|
|
|
:events="schoolEvents"
|
|
|
:title="marker.school_name"
|
|
|
- :label="{content: marker.school_name, offset: [0, -23]}"
|
|
|
+ :label="{content: marker.school_name, offset: [0, -20]}"
|
|
|
:extData="{id: marker.id}"
|
|
|
>
|
|
|
</el-amap-marker>
|
|
@@ -72,7 +72,7 @@
|
|
|
:position="marker.position"
|
|
|
:events="estateEvents"
|
|
|
:title="marker.estate_name"
|
|
|
- :label="{content: marker.estate_name, offset: [0, -23]}"
|
|
|
+ :label="{content: marker.estate_name, offset: [0, -20]}"
|
|
|
:extData="{id: marker.id}"
|
|
|
>
|
|
|
<!-- https://img2.honglounews.com/20220110041534-8330.png -->
|
|
@@ -151,10 +151,10 @@ export default {
|
|
|
// },
|
|
|
],
|
|
|
markerData: [],
|
|
|
- events: {
|
|
|
+ mapEvents: {
|
|
|
init(map) {
|
|
|
// map.setFeatures(['road', 'point', 'bg', 'building']); // 多个种类要素显示
|
|
|
- // map.setFeatures(['road']); // 多个种类要素显示
|
|
|
+ map.setFeatures(['road', 'bg', 'building']); // 多个种类要素显示
|
|
|
// map.setMapStyle('amap://styles/647a4a7f773b3c7143b46e7c3e499f1f');
|
|
|
AMapUI.loadUI(['control/BasicControl'], function(BasicControl) {
|
|
|
//图层切换控件
|
|
@@ -187,6 +187,9 @@ export default {
|
|
|
const curMap = amapManager.getMap()
|
|
|
that.mapDiyObj.zoom = curMap.getZoom() || 17
|
|
|
},
|
|
|
+ complete () {
|
|
|
+ that.setCurFeatures(that.mapDiyObj.features)
|
|
|
+ },
|
|
|
// click(e) {
|
|
|
// const { lng, lat } = e.lnglat
|
|
|
// console.log(lng, lat)
|
|
@@ -293,13 +296,11 @@ export default {
|
|
|
{ label: '最大19-', key: 'zoom2', rules: 1},
|
|
|
]
|
|
|
this.setDefaultValue(params)
|
|
|
- this.setCurFeatures(params.features)
|
|
|
+ // this.setCurFeatures(params.features)
|
|
|
},
|
|
|
setCurFeatures (data) {
|
|
|
- window.setTimeout(() => {
|
|
|
- const curMap = this.amapManager.getMap()
|
|
|
- curMap.setFeatures(data)
|
|
|
- }, 500)
|
|
|
+ const curMap = this.amapManager.getMap()
|
|
|
+ curMap.setFeatures(data)
|
|
|
},
|
|
|
getData () {
|
|
|
const query = this.$route.query
|
|
@@ -321,7 +322,7 @@ export default {
|
|
|
zooms: [15, 19],
|
|
|
center: [115.852386, 28.684076],
|
|
|
title: res.title,
|
|
|
- features: ['road', 'bg', 'building']
|
|
|
+ features: ['road']
|
|
|
}
|
|
|
}
|
|
|
this.getDef()
|