bug
This commit is contained in:
@@ -181,7 +181,6 @@ export default {
|
|||||||
this.id = this.params.id
|
this.id = this.params.id
|
||||||
this.getDetail()
|
this.getDetail()
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.getMap(this.info.lng,this.info.lat,this.info.address)
|
|
||||||
},500)
|
},500)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -272,17 +271,17 @@ export default {
|
|||||||
version: '2.0',
|
version: '2.0',
|
||||||
plugins: ['AMap.PlaceSearch', 'AMap.AutoComplete', 'AMap.Geocoder'],
|
plugins: ['AMap.PlaceSearch', 'AMap.AutoComplete', 'AMap.Geocoder'],
|
||||||
}).then((AMap) => {
|
}).then((AMap) => {
|
||||||
this.mapDetail = new AMap.Map(document.getElementById("mapDetail"), {
|
this.mapDetail = new AMap.Map(document.getElementById("mapDetail"), {
|
||||||
resizeEnable: true,
|
resizeEnable: true,
|
||||||
zooms: [6, 20],
|
zooms: [6, 20],
|
||||||
zoom: 11,
|
zoom: 11,
|
||||||
|
})
|
||||||
|
var marker = new AMap.Marker({
|
||||||
|
position: new AMap.LngLat(lng,lat),
|
||||||
|
title: address
|
||||||
|
})
|
||||||
|
this.mapDetail.add(marker);
|
||||||
})
|
})
|
||||||
})
|
|
||||||
var marker = new AMap.Marker({
|
|
||||||
position: new AMap.LngLat(lng,lat),
|
|
||||||
title: address
|
|
||||||
})
|
|
||||||
this.mapDetail.add(marker);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
update() {
|
update() {
|
||||||
@@ -301,6 +300,7 @@ export default {
|
|||||||
this.info = res.data
|
this.info = res.data
|
||||||
this.placeDetail.lng = res.data.lng
|
this.placeDetail.lng = res.data.lng
|
||||||
this.placeDetail.lat = res.data.lat
|
this.placeDetail.lat = res.data.lat
|
||||||
|
this.getMap(this.info.lng,this.info.lat,this.info.address)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user