जब भी हम एक MapView लोड करते हैं, यह automaticallay वर्तमान उपयोगकर्ता स्थान सही पता चलता है। मेरे मामले में मैं नक्शे पर किसी अन्य स्थान दिखा रहा हूँ, ऐसा है कि नक्शा वर्तमान स्थान लोड करता है और स्थान मैं दे दिया है करने के लिए जूम .. लेकिन, वर्तमान स्थान बिंदु (नीले एक जो automaticay आता है ..) नहीं दिख रहा था। मैं mapView.showCurrentLocation दे दिया है = true; लेकिन इसकी नहीं दिखा रहा। इतना कर सकता है किसी भी एक तरीका बताता है यह काम करता है और यह वर्तमान स्थान निशान कहना चाहिए और उसके बाद बिंदु मैं दे दिया है करने के लिए जूम। धन्यवाद
- (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id <MKAnnotation>)annotation {
static NSString *defaultPinID = @CameraAnnotation;
MKPinAnnotationView *retval = nil;
static int postag=1;
(MKPinAnnotationView *)[mapView dequeueReusableAnnotationViewWithIdentifier:defaultPinID];
if(annotation=MapView.userLocation)
{
return nil;
}
// If we have to, create a new view
else if (retval == nil)
{
retval = [[[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:defaultPinID] autorelease];
UIButton *myDetailButton = [UIButton buttonWithType:UIButtonTypeDetailDisclosure];
myDetailButton.frame = CGRectMake(0, 0, 50, 23);
myDetailButton.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
myDetailButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentCenter;
myDetailButton.tag=postag;
postag++;
[myDetailButton addTarget:self action:@selector(showLinks:) forControlEvents:UIControlEventTouchUpInside];
retval.rightCalloutAccessoryView = myDetailButton;
[retval setPinColor:MKPinAnnotationColorRed];
retval.animatesDrop = YES;
retval.canShowCallout = YES;
}
return retval;
}













