|
|
@@ -121,7 +121,7 @@ export default {
|
|
|
preList: [],
|
|
|
map: null,
|
|
|
geocoder: '',
|
|
|
- keyword: '相国',
|
|
|
+ keyword: '',
|
|
|
auto: null,
|
|
|
latitude: 0,
|
|
|
longitude: 0,
|
|
|
@@ -173,10 +173,13 @@ export default {
|
|
|
this.map.on('complete', () => {
|
|
|
this.addEvent()
|
|
|
this.mapSearchInit()
|
|
|
- if (this.latLng.length > 0) {
|
|
|
+ if (this.latLng.length > 0 && this.latLng[0] !== undefined) {
|
|
|
this.latitude = this.latLng[0]
|
|
|
this.longitude = this.latLng[1]
|
|
|
this.addMarker(this.latLng[0], this.latLng[1])
|
|
|
+ } else {
|
|
|
+ const tmp = this.map.getCenter()
|
|
|
+ this.map.setCenter([tmp.lng, tmp.lat])
|
|
|
}
|
|
|
})
|
|
|
},
|