245
This commit is contained in:
@@ -220,6 +220,7 @@ export default {
|
||||
this.showMap = false
|
||||
},
|
||||
initMap() {
|
||||
if (this.map) return
|
||||
AMapLoader.load({
|
||||
key: '54a02a43d9828a8f9cd4f26fe281e74e',
|
||||
version: '2.0',
|
||||
@@ -228,7 +229,7 @@ export default {
|
||||
this.map = new AMap.Map('map', {
|
||||
resizeEnable: true,
|
||||
zooms: [6, 20],
|
||||
center:[this.lng, this.lat],
|
||||
center: this.form.lng ? [this.form.lng, this.form.lat] : [this.lng, this.lat],
|
||||
zoom: 11,
|
||||
})
|
||||
this.placeSearch = new AMap.PlaceSearch({ map: this.map })
|
||||
@@ -286,6 +287,7 @@ export default {
|
||||
resizeEnable: true,
|
||||
zooms: [6, 20],
|
||||
zoom: 11,
|
||||
center:[lng,lat],
|
||||
})
|
||||
let marker = new AMap.Marker({
|
||||
position: new AMap.LngLat(lng,lat),
|
||||
|
||||
@@ -143,6 +143,7 @@
|
||||
resizeEnable: true,
|
||||
zooms: [6, 20],
|
||||
zoom: 11,
|
||||
center:[lng,lat],
|
||||
})
|
||||
let marker = new AMap.Marker({
|
||||
position: new AMap.LngLat(lng,lat),
|
||||
|
||||
Reference in New Issue
Block a user