【发布时间】:2016-01-03 17:49:11
【问题描述】:
我找不到确切的问题。
我有一些在标准地图上看起来不错的自定义图钉。如果地图更改为卫星或混合,我想使用其他图钉。
这可能吗?
到目前为止我已经尝试过了:
annotationImageName = @"blackPin.png";
if (segment == 1) {
NSLog(@"segment 1");
annotationImageName = @"whitePin.png";
}
else if (segment == 2) {
NSLog(@"segment 2");
annotationImageName = @"greyPin.png";
}
}
......
MKAnnotationView *annotationView = [[MKAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:@"annotationPin"];
annotationView.image = [UIImage imageNamed:annotationImageName];
【问题讨论】:
标签: ios mapkit mapkitannotation