This commit is contained in:
yanran200730
2022-01-14 17:41:58 +08:00
parent 16c6367115
commit 0a33279029

View File

@@ -199,6 +199,7 @@ export default {
}, },
handleSelect(e) { handleSelect(e) {
if (e?.points?.length > 0) { if (e?.points?.length > 0) {
this.form = e
const points = e.points.map(e => new TMap.LatLng(e.lat, e.lng)) const points = e.points.map(e => new TMap.LatLng(e.lat, e.lng))
var position = TMap.geometry.computeCentroid(points) var position = TMap.geometry.computeCentroid(points)
this.map.setCenter(position) this.map.setCenter(position)