diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2015-03-30 16:27:28 -0700 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2015-04-03 12:07:53 -0700 |
commit | 6a1e7d5707762561e4947e90f94c1ede9e2940cc (patch) | |
tree | 068d7685c569332ac4d7cb09d7b383d6500b0bc7 /include/mbgl/ios | |
parent | 999ebb371e98bb9ee5876cfad336426c5abae7a8 (diff) | |
download | qtlocation-mapboxgl-6a1e7d5707762561e4947e90f94c1ede9e2940cc.tar.gz |
Fixed race condition after setting access token
`Map` should be able to deal with having no access token or JSON even while it’s running. Most of `Map` accounts for this situation, but `reloadStyle()` incorrectly assumes that one or the other is set. This change corrects the assumption in `reloadStyle()`.
Also expose the access token and style name to clients as ordinary KVO-compliant properties. Actually, they’re not so ordinary because they’re inspectable!
Ref #1070, #1147
Diffstat (limited to 'include/mbgl/ios')
-rw-r--r-- | include/mbgl/ios/MGLMapView.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/mbgl/ios/MGLMapView.h b/include/mbgl/ios/MGLMapView.h index 17741b1711..354e32cc5a 100644 --- a/include/mbgl/ios/MGLMapView.h +++ b/include/mbgl/ios/MGLMapView.h @@ -54,7 +54,7 @@ /** Sets a Mapbox API access token for the map view. * @param accessToken A Mapbox API token. */ -- (void)setAccessToken:(NSString *)accessToken; +@property (nonatomic) IBInspectable NSString *accessToken; #pragma mark - Managing Constraints @@ -194,11 +194,11 @@ /** Sets the map style to a named, bundled style. * @param styleName The map style name to use. */ -- (void)useBundledStyleNamed:(NSString *)styleName; +@property (nonatomic) IBInspectable NSString *styleName; /** Sets the map style URL to use. * @param styleURL The map style URL to use. Can be either an HTTP/HTTPS URL or a Mapbox map ID style URL (`mapbox://<user.style>`). */ -- (void)setStyleURL:(NSURL *)styleURL; +@property (nonatomic) NSURL *styleURL; #pragma mark - Annotating the Map |