Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
codify implicit assumption about marker-providing delegate method pre…
Browse files Browse the repository at this point in the history
…cedence
  • Loading branch information
incanus committed Jul 26, 2016
1 parent 8cfaac1 commit 4e61b2e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions platform/ios/app/MBXViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 4e61b2e

Please sign in to comment.