This commit is contained in:
yanran200730
2022-08-15 10:28:46 +08:00
parent 1492562f7b
commit 25e45267c1
4 changed files with 522 additions and 16 deletions

View File

@@ -80,19 +80,29 @@ export default {
lng: res.longitude
}
if (latLng.lat) {
this.mapLib = TMap
this.tmap = new TMap.Map(this.$refs.tmap, {
zoom: 11,
center: new TMap.LatLng(latLng.lat, latLng.lng),
...this.ops
})
this.$emit('update:lib', TMap)
this.$emit('update:map', this.tmap)
this.$emit('loaded')
this.areaId && this.getMapArea()
// this.mapLib = TMap
// this.tmap = new TMap.Map(this.$refs.tmap, {
// zoom: 11,
// center: new TMap.LatLng(latLng.lat, latLng.lng),
// ...this.ops
// })
// this.$emit('update:lib', TMap)
// this.$emit('update:map', this.tmap)
// this.$emit('loaded')
// this.areaId && this.getMapArea()
}
}
})
this.mapLib = TMap
this.tmap = new TMap.Map(this.$refs.tmap, {
zoom: 11,
// center: new TMap.LatLng(latLng.lat, latLng.lng),
...this.ops
})
this.$emit('update:lib', TMap)
this.$emit('update:map', this.tmap)
this.$emit('loaded')
this.areaId && this.getMapArea()
}
},
fitBounds(latLngList, count = 0) {