我正在从 geoJSON 功能列表开始渲染一些 FillLayers。
现在我想以编程方式将相机移动到给定功能的中心,以便整个功能在视口中可见。
func centerCameraTo(feature: Feature) {
guard let mapView = self.mapView else { print("[centerCameraTo] no mapView"); return }
mapView.mapboxMap.setCamera(to: ???)
}
我该怎么做?