How to determine if Google Maps tiles have downloaded

I am using the Google Maps API in my iOS application. At the end of the session, the map is scaled and captures a screenshot. Unfortunately, at the moment, the map does not have time to load all the tiles subjected to scaling before taking a screenshot.

I see that Apple MKMapView has a delegate mapViewDidFinishLoadingMap. Is there something similar in the Google API?

+4
source share
3 answers

The Google Maps SDK for iOS has a method called mapViewDidFinishTileRendering, which is called when the map finishes rendering.

-(void)mapViewDidFinishTileRendering:(GMSMapView *)mapView{
    //TAKE THE SCREENSHOT HERE
}

Also, be sure to set a delegate.

+5
source

API Javascript Google Maps , tilesloaded.

SDK Google Maps iOS . GMSMapViewDelegate. , mapView: idleAtCameraPosition: .

+2

iOS SDK mapViewSnapshotReady, GMSMapViewDelegate

:

, ( , , ) .

 func mapViewSnapshotReady(_ mapView: GMSMapView) {
        // map ready to use
 }
0

All Articles