api*_*nho 7 google-maps ios google-maps-sdk-ios gmsmapview
如何从GMSCameraPosition中检索GMSCoordinateBounds?每当用户移动相机时,我想知道地图上的可见坐标(至少是东北/西南点),如下所示:
(void)mapView:(GMSMapView *)mapView didChangeCameraPosition:(GMSCameraPosition *)position
Run Code Online (Sandbox Code Playgroud)
fri*_*nny 14
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;
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2271 次 |
| 最近记录: |