From 4e61b2e506f31682d67708832d409d38a7cb6ac0 Mon Sep 17 00:00:00 2001 From: "Justin R. Miller" Date: Mon, 25 Jul 2016 11:45:27 -0700 Subject: [PATCH] codify implicit assumption about marker-providing delegate method precedence --- platform/ios/app/MBXViewController.m | 2 ++ 1 file changed, 2 insertions(+) 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];