- (MKAnnotationView *) mapView: (MKMapView *) aMapView viewForAnnotation: (id) annotation
{
if ([annotation isKindOfClass: [MyAnnotation class]]!) / / Don't mess user location
return nil;
MKAnnotationView * annotationView = [aMapView dequeueReusableAnnotationViewWithIdentifier: @ "spot"];
if (! annotationView)
{
annotationView = [[MKAnnotationView alloc] initWithAnnotation: annotation reuseIdentifier: @ "spot"];
annotationView.rightCalloutAccessoryView = [UIButton buttonWithType: UIButtonTypeDetailDisclosure];
[(UIButton *) annotationView.rightCalloutAccessoryView addTarget: self action: @ selector (openSpot :) forControlEvents: UIControlEventTouchUpInside];
annotationView.enabled = YES;
annotationView.canShowCallout = YES;
annotationView.centerOffset = CGPointMake (7, -15);
annotationView.calloutOffset = CGPointMake (-8,0);
}
/ / Setup annotation view
annotationView.image = [UIImage imageNamed: @ "pinYellow.png"]; / / Or whatever
return annotationView;
}
Reply:
http://www.cocoachina.com/bbs/read.php?tid-30567-keyword-% B7% C5% B4% F3% BE% B5.html
Take the coordinates of the area, zoom in this area, are displayed in the top placed on a View. OK,
Reply:
Not a magnifying glass. A blue dot location. Looks like a circle
Reply:
The landlord would like to have a blue dot on the map, there is the effect of light blue iris do? If this is the case, you can control your mkmapview the shows user location will be checked in ib, or mkmapview object you defined: you map objects showsUserLocation = YES;.
Reply:
Upstairs positive solution map objects showsUserLocation = YES.;
Reply:
showsUserLocation = YES; no effect. Already add Annotation
Reply:
The default is to display the virtual machine as if somewhere in Europe or the United States, but really can display your current location
No comments:
Post a Comment