setCity()和setZoom()
直接上代码:
var that = this
this.map.setCity(city,function (e) {
that.map.setZoom(22)
})
setCenter()也是一样的
回调函数里的this指向不是vue实例,需要在外面定义个that
setCity()和setZoom()
直接上代码:
var that = this
this.map.setCity(city,function (e) {
that.map.setZoom(22)
})
setCenter()也是一样的
回调函数里的this指向不是vue实例,需要在外面定义个that