0
我在我的代碼中使用Mapkit,一切工作正常。但谷歌地圖(Mapkit)上通常顯示的谷歌符號不再顯示。任何人都可以告訴我什麼事情發生在我的代碼任何建議。谷歌符號不顯示在Mapkit
在此先感謝...
-(MKAnnotationView *)mapView:(MKMapView *)mV viewForAnnotation:
(id <MKAnnotation>)annotation {
MKPinAnnotationView *pinView = nil;
if(annotation != mapView.userLocation)
{
static NSString *defaultPinID = @"com.invasivecode.pin";
pinView = (MKPinAnnotationView *)[mapView dequeueReusableAnnotationViewWithIdentifier:defaultPinID];
if (pinView == nil) pinView = [[[MKPinAnnotationView alloc]
initWithAnnotation:annotation reuseIdentifier:defaultPinID] autorelease];
pinView.pinColor = MKPinAnnotationColorRed;
pinView.canShowCallout = YES;
pinView.animatesDrop = YES;
}
else {
[mapView.userLocation setTitle:@"I am here"];
}
return pinView;
}
-(void)LoadLocationOfOffices {
places = [[NSMutableArray alloc] init];
Place *aPlace1 = [Place alloc];
aPlace.title = @"xyz";
aPlace.subtitle = @"xyz ";
CLLocationCoordinate2D crd1;
crd1.latitude = ;
crd1.longitude = ;
[aPlace1 addCoordinates:crd1];
[places addObject:aPlace1];
[aPlace1 release];
aPlace1 = nil;
/*
Object having address of office 2
*/
Place *aPlace2 = [Place alloc];
aPlace2.title = @"xyz";
aPlace2.subtitle = @"xyz ";
CLLocationCoordinate2D crd2;
crd2.latitude = ;
crd2.longitude = ;
[aPlace2 addCoordinates:crd2];
[places addObject:aPlace2];
[aPlace2 release];
aPlace2 = nil;
}
-(void) initializeNavigationalBar {
CLLocationCoordinate2D centreCarte;
centreCarte.latitude = ;
centreCarte.longitude = ;
MKCoordinateSpan zoom;
zoom.latitudeDelta = 2;
zoom.longitudeDelta = zoom.latitudeDelta;
MKCoordinateRegion region;
region.center = centreCarte;
region.span = zoom;
[mapView setRegion:region animated:TRUE];
[mapView addAnnotations:places];
}
你可以發佈您的代碼? – Gypsa
Plz檢查我更新我的代碼... – user768373