ios – didChangeCameraPosition获取可用坐标的边界框/矩形

如何从GMSCameraPosition中检索GMSCoordinateBounds?每当用户移动相机时,我想知道地图上的可见坐标(至少是东北/西南点),如下所示:
(void)mapView:(GMSMapView *)mapView didChangeCameraPosition:(GMSCameraPosition *)position

解决方法

GMSVisibleRegion visibleRegion = mapView.projection.visibleRegion;
GMSCoordinateBounds *bounds = [[GMSCoordinateBounds alloc] initWithRegion:visibleRegion];

// we've got what we want,but here are NE and SW points
CLLocationCoordinate2D northEast = bounds.northEast;
CLLocationCoordinate2D southWest = bounds.southWest;

相关文章

当我们远离最新的 iOS 16 更新版本时,我们听到了困扰 Apple...
欧版/美版 特别说一下,美版选错了 可能会永久丧失4G,不过只...
一般在接外包的时候, 通常第三方需要安装你的app进行测...
前言为了让更多的人永远记住12月13日,各大厂都在这一天将应...