在即将发布的MapBox iOS SDK 3.4版本中,应该可以为用户位置创建自定义注释。
在常规Apple MapKit中,我们通过在mapView:viewForAnnotation中创建自定义视图来实现此目的。
与MapBox相比,这种方法有何不同?我们根据它们所基于的类来识别注释。我假设我们希望也为类MGLUserLocation调用这个委托方法?
-(MGLAnnotationView *)mapView:(MGLMapView *)mapView viewForAnnotation:(id<MGLAnnotation>)annotation
{
if ([annotation isKindOfClass:[MGLUserLocation class]])
{
NSLog(@"MGLUserLocation"); // No hit
}
return nil;
}