Tôi mới sử dụng bản đồ trong mục tiêu-c. Tôi có thể thêm chú thích tùy chỉnh trong mapview.cách thêm chế độ xem chú dẫn tùy chỉnh trong chế độ xem bản đồ
tôi cần phải đặt giao diện tùy chỉnh chú thích như dưới đây hình ảnh
.
Nhưng tôi không hiểu cách tôi có thể thiết kế chế độ xem chú thích như thế này.
tôi biết tôi cần phải thêm chú dẫn trong chế độ xem cho phương pháp chú thích.
- (MKAnnotationView *)mapView:(MKMapView *)map viewForAnnotation:(id <MKAnnotation>)annotation
{
static NSString *AnnotationViewID = @"annotationViewID";
MKAnnotationView *annotationView = (MKAnnotationView *)[mapview dequeueReusableAnnotationViewWithIdentifier:AnnotationViewID];
if (annotationView == nil)
{
annotationView = [[[MKAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:AnnotationViewID] autorelease];
}
annotationView.image = [UIImage imageNamed:@"blue_without_pin.png"];
annotationView.annotation = annotation;
return annotationView;
}
http://shawnsbits.com/blog/2011/04/12/custom-map-pins-for-mapkit/..visit đây .. – Nit
cảm ơn cho nit phát lại của bạn, nhưng liên kết mà bạn đăng không hoạt động, nó cho thấy không có kết quả nào được tìm thấy –
http://shawnsbits.com/blog/2010/12/23/mapkit-overlays-session-1-overlay-map/ – hanumanDev