я использую следующее изображение [используя аннотации, MapkitView и т. Д.], Чтобы отметить некоторые местоположения.Но когда изображения отображаются, они появляются в 2 раза больше.Это нормально?
Вот унаследованный класс, который я использую
@interface ImageAnnotationView : MKAnnotationView {
UIImageView *_imageView;
id m_parent;
BusinessMapAnnotation *m_annotation;
NSString *stitle;
}
- (id)initWithAnnotation:(id <MKAnnotation>)annotation reuseIdentifier:(NSString *)reuseIdentifier
{
self = [super initWithAnnotation:annotation reuseIdentifier:reuseIdentifier];
self.backgroundColor = [UIColor clearColor];
self.m_annotation = (BusinessMapAnnotation*)annotation;
self.stitle = m_annotation.sTitle;
_imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:([stitle isEqualToString:@"You are here"]) ? @"Pushpin_large.png":@"NearPin.png"]];
_imageView.contentMode = UIViewContentModeCenter;
[self addSubview:_imageView];
_imageView.center = ([stitle isEqualToString:@"You are here"]) ? CGPointMake(15.0, -10.0):CGPointMake(kWidth/2, 0.0);
return self;
}