MKPinAnnotationViewピンの幅と高さ(ピクセル単位)はいくつですか?
編集:より具体的には、ピンを含むiPhone画面上の想像上の長方形の幅と高さ。
MKPinAnnotationViewピンの幅と高さ(ピクセル単位)はいくつですか?
編集:より具体的には、ピンを含むiPhone画面上の想像上の長方形の幅と高さ。
以下のコードによると、ピン画像と MKPinAnnotationView は両方とも幅 32 ポイント、高さ 39 ポイントです。
- (MKAnnotationView *)mapView:(MKMapView *)mapView
viewForAnnotation:(id <MKAnnotation>)annotation
{
MKPinAnnotationView *pav = (MKPinAnnotationView *)[mapView
dequeueReusableAnnotationViewWithIdentifier:@"test"];
if (pav == nil)
{
pav = [[[MKPinAnnotationView alloc] initWithAnnotation:annotation
reuseIdentifier:@"test"] autorelease];
}
pav.annotation = annotation;
NSLog(@"pav.frame.size = %@, pav.image.size = %@",
NSStringFromCGSize(pav.frame.size),
NSStringFromCGSize(pav.image.size));
return pav;
}