编辑:这是此 SDK 的确认错误
我正在使用Google Maps for iOS SDK的1.1.1.2311版本,我正在寻找屏幕上可见地图的边界纬度和经度坐标.
我正在使用以下代码告诉我当前的预测是什么:
NSLog(@"\n%@,%@\n%@,%@\n%@,%@\n%@,%@\n",
[NSNumber numberWithDouble:mapView.projection.visibleRegion.farLeft.latitude],
[NSNumber numberWithDouble:mapView.projection.visibleRegion.farLeft.longitude],
[NSNumber numberWithDouble:mapView.projection.visibleRegion.farRight.latitude],
[NSNumber numberWithDouble:mapView.projection.visibleRegion.farRight.longitude],
[NSNumber numberWithDouble:mapView.projection.visibleRegion.nearLeft.latitude],
[NSNumber numberWithDouble:mapView.projection.visibleRegion.nearLeft.longitude],
[NSNumber numberWithDouble:mapView.projection.visibleRegion.nearRight.latitude],
[NSNumber numberWithDouble:mapView.projection.visibleRegion.nearRight.longitude]);
Run Code Online (Sandbox Code Playgroud)
从阅读标题时,似乎相机移动时可能无法更新.很公平...
/**
* The GMSProjection currently used by this GMSMapView. This is a snapshot of
* the current projection, and will not automatically update when the camera
* moves. The projection may be nil while the render is not running (if the map
* is not yet part of your UI, or is …
Run Code Online (Sandbox Code Playgroud)