Biz MapView yük zaman, bu automaticallay geçerli kullanıcı konum hakkını gösterir. Benim durumumda ben harita geçerli konumunu yükler öyle ki, harita üzerinde başka bir konum gösteriyorum ve ben verdik konuma uzaklaştırdınız .. ama, geçerli konum noktası (automaticay geliyor tane mavi ..) gösterilmiyordu. i = GERÇEK mapView.showCurrentLocation verdik; ama onun gösterilmiyor. böylece olabilir herhangi bir işe yarıyor ve mevcut konum işareti demeliyim ve sonra ben verdik noktaya uzaklaştırdınız yolunu söyler. Teşekkürler
- (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;
}













