Merge pull request #1577 from mapbox/1ec5-did-fail-to-fail
Properly fail to load the map
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
'../platform/ios/MGLUserLocationAnnotationView.h',
|
||||
'../platform/ios/MGLUserLocationAnnotationView.m',
|
||||
'../include/mbgl/ios/MGLTypes.h',
|
||||
'../platform/ios/MGLTypes.m',
|
||||
'../platform/ios/NSBundle+MGLAdditions.h',
|
||||
'../platform/ios/NSBundle+MGLAdditions.m',
|
||||
'../platform/ios/NSException+MGLAdditions.h',
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
extern NSString * const MGLErrorDomain;
|
||||
|
||||
/** The mode used to track the user location on the map. */
|
||||
typedef NS_ENUM(NSUInteger, MGLUserTrackingMode)
|
||||
{
|
||||
|
||||
@@ -2352,9 +2352,10 @@ CLLocationCoordinate2D latLngToCoordinate(mbgl::LatLng latLng)
|
||||
}
|
||||
case mbgl::MapChangeDidFailLoadingMap:
|
||||
{
|
||||
if ([self.delegate respondsToSelector:@selector(mapViewDidFailLoadingMap:withError::)])
|
||||
if ([self.delegate respondsToSelector:@selector(mapViewDidFailLoadingMap:withError:)])
|
||||
{
|
||||
[self.delegate mapViewDidFailLoadingMap:self withError:nil];
|
||||
NSError *error = [NSError errorWithDomain:MGLErrorDomain code:0 userInfo:nil];
|
||||
[self.delegate mapViewDidFailLoadingMap:self withError:error];
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
3
platform/ios/MGLTypes.m
Normal file
3
platform/ios/MGLTypes.m
Normal file
@@ -0,0 +1,3 @@
|
||||
#import "MGLTypes.h"
|
||||
|
||||
NSString * const MGLErrorDomain = @"MGLErrorDomain";
|
||||
Reference in New Issue
Block a user