diff --git a/platform/ios/app/MBXViewController.m b/platform/ios/app/MBXViewController.m index 5176692e1d9..ef91c847be2 100644 --- a/platform/ios/app/MBXViewController.m +++ b/platform/ios/app/MBXViewController.m @@ -639,6 +639,8 @@ - (MGLAnnotationImage *)mapView:(MGLMapView * __nonnull)mapView imageForAnnotati return nil; // use default marker } + NSAssert([annotation isKindOfClass:[MBXSpriteBackedAnnotation class]], @"Annotations should be sprite-backed."); + NSString *title = [(MGLPointAnnotation *)annotation title]; if (!title.length) return nil; NSString *lastTwoCharacters = [title substringFromIndex:title.length - 2];