MKMapView'ımın geçerli konumu gösterecek şekilde ayarladım. Ayrıca diğer iğneler için uygulanan özel bir pin var. Ancak, mevcut konum özel bir pim olarak gösteriliyor, oysa ben sadece normal bir mavi daire olmasını istedim (google haritasının sahip olduğu gibi).MKMap Geçerli konum özel pingler olarak gösteriliyor
- (MKAnnotationView *) mapView: (MKMapView *) mapView viewForAnnotation: (id<MKAnnotation>) annotation MKAnnotationView *pin = (MKAnnotationView *) [self.mapView dequeueReusableAnnotationViewWithIdentifier: @"VoteSpotPin"];
if (pin == nil)
{
pin = [[[MKAnnotationView alloc] initWithAnnotation: annotation reuseIdentifier: @"TestPin"] autorelease];
}
else
{
pin.annotation = annotation;
}
[pin setImage:[UIImage imageNamed:@"TestPin.png"]];
pin.canShowCallout = YES;
pin.rightCalloutAccessoryView = [UIButton buttonWithType:UIButtonTypeDetailDisclosure];
return pin;
}
Nasıl bir pin olarak göstermek için mevcut konumu önleyebilir:
benim kodunda aşağıdaki tanımladık?
mapView.showsUserLocation = EVET o zaman mevcut konumu gösterecektir; – Srinivas
Bunu yaptım ve şu anki konumu mavi daire değil, sahip olduğum özel bir iğne olarak gösteriyor. Bu aslında gerçek sorun – adit
uygulamanızın cihaz veya simülatör – Srinivas