[ios, macos] fixes #7059: raise exception for abstract sources on add (#7060)

This commit is contained in:
Justin R. Miller
2016-11-14 16:02:16 -08:00
committed by GitHub
parent dbd2235744
commit f7db6cf760

View File

@@ -206,6 +206,13 @@ static NSURL *MGLStyleURL_emerald;
- (void)addSource:(MGLSource *)source
{
if (!source.rawSource) {
[NSException raise:NSInvalidArgumentException format:
@"The source %@ cannot be added to the style. "
@"Make sure the source was created as a member of a concrete subclass of MGLSource.",
source];
}
[source addToMapView:self.mapView];
}