for (Shop *shop in self.shops) {
ShopAnnotation *ann = [ShopAnnotation annotationWithShop:shop];
[self.mapView addAnnotation:ann];

CGPoint annPoint = [self.mapView convertCoordinate:ann.coordinate
toPointToView:self.mapView];

if (annPoint.x > 0.0 && annPoint.y > 0.0 &&
annPoint.x < self.mapView.frame.size.width &&
annPoint.y < self.mapView.frame.size.height) {
NSLog(@"%@ Coordinate: %f %f", ann.title, annPoint.x, annPoint.y);
}
}

Drawing polyines or routes on a MKMapView (Using Map Kit on the iPhone)



发表评论

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

CAPTCHA image