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