amikor betöltjük a mapview, akkor automaticallay mutatja az aktuális felhasználó tartózkodási helyét jobb. Az én esetemben én mutatja egy másik helyre a térképen, úgy, hogy a térképen betölti az aktuális helyet és nagyíthatók a helyét én adott .. de a jelenlegi helyét a pont nem jelenik meg (a kéket, amely jön automaticay ..). én adott mapView.showCurrentLocation = TRUE; de nem jelenik meg. így tudott bármelyike elmondja, hogy hogyan működik, és meg kell mondani, a jelenlegi helyéről jel, majd a maximális nagyítást pont én adott. Kösz
- (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;
}













