मैं वर्तमान स्थान आइकन के लिए कस्टम कॉल आउट (शीर्षक और उपशीर्षक) का उपयोग कर रहा हूं। मैंने डिफ़ॉल्ट एनोटेशन को अक्षम करने के लिए निम्न कोशिश की लेकिन यह काम नहीं करता है।सेटिंग वर्तमान स्थान एनोटेशन के लिए CanShowCallOut = NO, आईफोन
- (MKAnnotationView *) mapView:(MKMapView *)mapView viewForAnnotation:(id <MKAnnotation>) annotation
{
NSLog(@"viewForAnnotation");
if ([annotation isKindOfClass:[MKUserLocation class]])
{
MKAnnotationView *userLocationView = [mapView viewForAnnotation:annotation];
userLocationView.canShowCallout = NO;
NSLog(@"[annotation isKindOfClass:[MKUserLocation class]");
return nil;
}
}
केवल जिस तरह से यह काम करता है
-(void)mapView:(MKMapView *)mapView didSelectAnnotationView:(MKAnnotationView *)ann
{
if([ann.annotation isKindOfClass:[MKUserLocation class]])
{
[mymap deselectAnnotation:ann.annotation animated:NO];
}
}
है लेकिन यह कभी कभी समय लेता है। क्या वर्तमान स्थान एनोटेशन के लिए डिफ़ॉल्ट कॉलआउट दृश्य अक्षम करने का कोई अन्य तरीका है? किसी भी तरह की सहायता को आभार समझेंगे।
आप वर्तमान स्थान के लिए डिफ़ॉल्ट एनोटेशन द्वारा नीले बिंदु मतलब है? – Ravin
@ राविन, हां। वर्तमान स्थान एनोटेशन द्वारा मेरा मतलब नीली पल्सिंग डॉट है। – chatur