2013-04-03 7 views
12

So che è facile nella versione java di Google Maps ma non riesco a capire come ottenere la finestra informativa da chiudere nella versione C obiettivo dell'SDK.Chiudi finestra informazioni di un marker a livello di programmazione google maps iOS

sto usando questo metodo:

-(void) mapView:(GMSMapView *)mapView 
    didTapInfoWindowOfMarker:(id<GMSMarker>)marker { 

    sharedGlobal.shouldShowPlayer = YES; 

    /* adds the path to the map by decoding google's encoded string */ 
    [self addPath: sharedGlobal.encodedPathString]; 
} 

e si desidera aggiungere una linea per chiudere l'infowindow associato con pennarello.

risposta

34

Penso che si può usare questo:

mapView.selectedMarker = nil; 

I commenti sulla proprietà selectedMarker in GMSMapView.h dire questo:

/** 
* The marker that is selected. Setting this property selects a particular 
* marker, showing an info window on it. If this property is non-nil, setting 
* it to nil deselects the marker, hiding the info window. This property is 
* observable using KVO. 
*/ 
@property (nonatomic, strong) id<GMSMarker> selectedMarker; 
+0

molto bene ha risposto ... Grazie –

Problemi correlati