2013-04-03 9 views
12

मुझे पता है कि Google मानचित्र के जावा संस्करण में यह आसान है, लेकिन मैं यह नहीं समझ सकता कि एसडीके के उद्देश्य सी संस्करण में बंद करने के लिए जानकारी विंडो कैसे प्राप्त करें।मार्कर प्रोग्रामेटिक रूप से Google मानचित्र आईओएस

मैं इस पद्धति का उपयोग कर रहा हूँ:

-(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]; 
} 

और मार्कर के साथ जुड़े infowindow बंद करने के लिए एक पंक्ति जोड़ना चाहते हैं।

उत्तर

34

मुझे लगता है कि आप इस का उपयोग कर सकते हैं:

mapView.selectedMarker = nil; 

GMSMapView.h में selectedMarker संपत्ति पर टिप्पणी कहते हैं कि यह:

/** 
* 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

बहुत अच्छी तरह से जवाब ... धन्यवाद –

संबंधित मुद्दे