2013-03-26 12 views

risposta

13

Questo è molto semplice, basta:

@property (nonatomic, strong) GMSMapView *mapView; 

- (void)didTapFitBoundsWithMarkers:(NSArray *)markers 
{ 
GMSCoordinateBounds *bounds = [[GMSCoordinateBounds alloc] init];; 

for (GMSMarker *marker in markers) { 
    bounds = [bounds includingCoordinate:marker.position]; 
} 

GMSCameraUpdate *update = [GMSCameraUpdate fitBounds:bounds]; 
[self.mapView moveCamera:update]; 
[self.mapView animateToViewingAngle:50]; 
} 
+0

Grazie per la vostra attenzione. Quando ho postato la domanda non sono riuscito a trovare questo metodo ('includingCoordinate') nella versione earler di GMapsSDK. E l'API non include la classe 'GMSCameraUpdate' – hash3r

Problemi correlati