[ios, macos] handle duplicate source error
This commit is contained in:
committed by
Ivo van Dongen
parent
379bf08723
commit
d8cef78502
@@ -223,7 +223,11 @@ static NSURL *MGLStyleURL_emerald;
|
||||
source];
|
||||
}
|
||||
|
||||
[source addToMapView:self.mapView];
|
||||
try {
|
||||
[source addToMapView:self.mapView];
|
||||
} catch (std::runtime_error & err) {
|
||||
[NSException raise:@"Could not add source" format:@"%s", err.what()];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)removeSource:(MGLSource *)source
|
||||
|
||||
Reference in New Issue
Block a user