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

Commit

Permalink
Only console log the features-as-annotations warning once per session
Browse files Browse the repository at this point in the history
  • Loading branch information
friedbunny committed Jul 19, 2017
1 parent 5fabed1 commit 032157a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion platform/ios/src/MGLMapView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -3189,7 +3189,10 @@ - (void)addAnnotations:(NS_ARRAY_OF(id <MGLAnnotation>) *)annotations

if ([annotation conformsToProtocol:@protocol(MGLFeature)])
{
NSLog(@"Warning: Annotations that conform to the MGLFeature protocol do not keep their `identifier` or `attributes` properties when added to the map as annotations. Add this feature using runtime styling if you intend to later query the map for it. %@", annotation.description);
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
NSLog(@"Annotations that conform to the MGLFeature protocol do not keep their `identifier` or `attributes` properties when added to the map as annotations. Add this feature using runtime styling if you intend to later query the map for it. This warning is only shown once. %@", annotation.description);
});
}

// adding the same annotation object twice is a no-op
Expand Down

0 comments on commit 032157a

Please sign in to comment.