在iOS的MapKit中,我们有一个返回地图坐标中心的属性。
mapView.centerCoordinate.latitude mapView.centerCoordinate.longitude
在这里 mapView GMSMapView . 你需要使用 projection 谷歌地图的属性。
mapView
GMSMapView
projection
let lat = mapView.projection.coordinate(for: mapView.center).latitude let lng = mapView.projection.coordinate(for: mapView.center).longitude print("center Lat & Lng = \(lat), \(lng)")