diff options
Diffstat (limited to 'platform/macos/src')
-rw-r--r-- | platform/macos/src/MGLMapView.mm | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/platform/macos/src/MGLMapView.mm b/platform/macos/src/MGLMapView.mm index 4e8f3c2b88..9cbc923271 100644 --- a/platform/macos/src/MGLMapView.mm +++ b/platform/macos/src/MGLMapView.mm @@ -610,13 +610,14 @@ public: // Default to Streets. if (!styleURL) { - // An access token is required to load any default style, including - // Streets. - if (![MGLAccountManager accessToken]) { - return; - } styleURL = [MGLStyle streetsStyleURLWithVersion:MGLStyleDefaultVersion]; } + + // An access token is required to load any default style, including Streets. + if (![MGLAccountManager accessToken] && [styleURL.scheme isEqualToString:@"mapbox"]) { + NSLog(@"Cannot set the style URL to %@ because no access token has been specified.", styleURL); + return; + } styleURL = styleURL.mgl_URLByStandardizingScheme; self.style = nil; |