Add missing sourceDidChange event (#3421)
This commit is contained in:
@@ -2264,6 +2264,11 @@ CLLocationCoordinate2D randomWorldCoordinate(void) {
|
||||
|
||||
// MARK: - MLNMapViewDelegate
|
||||
|
||||
- (void)mapView:(MLNMapView *)mapView sourceDidChange:(MLNSource *)source
|
||||
{
|
||||
NSLog(@"A source was updated: %@", source.identifier);
|
||||
}
|
||||
|
||||
- (void)mapView:(MLNMapView *)mapView
|
||||
shaderWillCompile:(NSInteger)id
|
||||
backend:(NSInteger)backend
|
||||
|
||||
@@ -6933,8 +6933,13 @@ static void *windowScreenContext = &windowScreenContext;
|
||||
}
|
||||
|
||||
- (void)sourceDidChange:(MLNSource *)source {
|
||||
// no-op: we only show attribution after tapping the info button, so there's no
|
||||
// interactive update needed.
|
||||
if (!_mbglMap) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ([self.delegate respondsToSelector:@selector(mapView:sourceDidChange:)]) {
|
||||
[self.delegate mapView:self sourceDidChange:source];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)didFailToLoadImage:(NSString *)imageName {
|
||||
|
||||
@@ -302,6 +302,14 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
*/
|
||||
- (void)mapView:(MLNMapView *)mapView didFinishLoadingStyle:(MLNStyle *)style;
|
||||
|
||||
/**
|
||||
Tells the delegate that the source changed.
|
||||
|
||||
@param mapView The map view that owns the source.
|
||||
@param source The source that changed.
|
||||
*/
|
||||
- (void)mapView:(MLNMapView *)mapView sourceDidChange:(MLNSource *)source;
|
||||
|
||||
/**
|
||||
Tells the delegate that the `mapView` is missing an image. The image should be added synchronously
|
||||
with ``MLNStyle/setImage:forName:`` to be rendered on the current zoom level. When loading icons
|
||||
|
||||
@@ -30,6 +30,8 @@ extension MLNMapViewDelegateIntegrationTests: MLNMapViewDelegate {
|
||||
|
||||
func mapView(_: MLNMapView, didFinishLoading _: MLNStyle) {}
|
||||
|
||||
func mapView(_: MLNMapView, sourceDidChange _: MLNSource) {}
|
||||
|
||||
func mapView(_: MLNMapView, didSelect _: MLNAnnotation) {}
|
||||
|
||||
func mapView(_: MLNMapView, didDeselect _: MLNAnnotation) {}
|
||||
|
||||
Reference in New Issue
Block a user