summaryrefslogtreecommitdiff
path: root/platform/osx/app/MapDocument.m
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2016-04-19 21:15:30 -0700
committerMinh Nguyễn <mxn@1ec5.org>2016-05-06 10:57:54 -0700
commit2a4eeadb295775236fe1a89b50f9179b790b127a (patch)
tree8efffe60f9a2cff3abad624dc889b37809bb0194 /platform/osx/app/MapDocument.m
parentd28b6f37190dc1c9cbb1e3973f8a4534b507865c (diff)
downloadqtlocation-mapboxgl-2a4eeadb295775236fe1a89b50f9179b790b127a.tar.gz
[core, ios, osx] Version default style URL APIs; deprecated Emerald
Updated default styles from v8 to v9. Deprecated the MGLMapView class methods in favor of new methods that take a version parameter. Deprecated Emerald outright in favor of Outdoors. Replaced usage of the unversioned MGLStyle methods with the corresponding versioned methods and MGLStyleCurrentVersion to ensure consistency. Expanded MGLStyle unit tests to also assert that MGLStyle has the right number of style URL methods and that they’re all public. Linked the OS X SDK unit test bundle to libmbgl-core.a. Removed an unnecessary dependency on osxapp. Replaced Emerald with Outdoors in iosapp and osxapp. Fixes the iOS and OS X side of #4577 and #4702.
Diffstat (limited to 'platform/osx/app/MapDocument.m')
-rw-r--r--platform/osx/app/MapDocument.m36
1 files changed, 18 insertions, 18 deletions
diff --git a/platform/osx/app/MapDocument.m b/platform/osx/app/MapDocument.m
index 2a537772b5..9a32302f87 100644
--- a/platform/osx/app/MapDocument.m
+++ b/platform/osx/app/MapDocument.m
@@ -120,22 +120,22 @@ static const CLLocationCoordinate2D WorldTourDestinations[] = {
NSURL *styleURL;
switch (tag) {
case 1:
- styleURL = [MGLStyle streetsStyleURL];
+ styleURL = [MGLStyle streetsStyleURLWithVersion:MGLStyleCurrentVersion];
break;
case 2:
- styleURL = [MGLStyle emeraldStyleURL];
+ styleURL = [MGLStyle outdoorsStyleURLWithVersion:MGLStyleCurrentVersion];
break;
case 3:
- styleURL = [MGLStyle lightStyleURL];
+ styleURL = [MGLStyle lightStyleURLWithVersion:MGLStyleCurrentVersion];
break;
case 4:
- styleURL = [MGLStyle darkStyleURL];
+ styleURL = [MGLStyle darkStyleURLWithVersion:MGLStyleCurrentVersion];
break;
case 5:
- styleURL = [MGLStyle satelliteStyleURL];
+ styleURL = [MGLStyle satelliteStyleURLWithVersion:MGLStyleCurrentVersion];
break;
case 6:
- styleURL = [MGLStyle hybridStyleURL];
+ styleURL = [MGLStyle hybridStyleURLWithVersion:MGLStyleCurrentVersion];
break;
default:
NSAssert(NO, @"Cannot set style from control with tag %li", (long)tag);
@@ -447,22 +447,22 @@ static const CLLocationCoordinate2D WorldTourDestinations[] = {
NSCellStateValue state;
switch (menuItem.tag) {
case 1:
- state = [styleURL isEqual:[MGLStyle streetsStyleURL]];
+ state = [styleURL isEqual:[MGLStyle streetsStyleURLWithVersion:MGLStyleCurrentVersion]];
break;
case 2:
- state = [styleURL isEqual:[MGLStyle emeraldStyleURL]];
+ state = [styleURL isEqual:[MGLStyle outdoorsStyleURLWithVersion:MGLStyleCurrentVersion]];
break;
case 3:
- state = [styleURL isEqual:[MGLStyle lightStyleURL]];
+ state = [styleURL isEqual:[MGLStyle lightStyleURLWithVersion:MGLStyleCurrentVersion]];
break;
case 4:
- state = [styleURL isEqual:[MGLStyle darkStyleURL]];
+ state = [styleURL isEqual:[MGLStyle darkStyleURLWithVersion:MGLStyleCurrentVersion]];
break;
case 5:
- state = [styleURL isEqual:[MGLStyle satelliteStyleURL]];
+ state = [styleURL isEqual:[MGLStyle satelliteStyleURLWithVersion:MGLStyleCurrentVersion]];
break;
case 6:
- state = [styleURL isEqual:[MGLStyle hybridStyleURL]];
+ state = [styleURL isEqual:[MGLStyle hybridStyleURLWithVersion:MGLStyleCurrentVersion]];
break;
default:
return NO;
@@ -557,12 +557,12 @@ static const CLLocationCoordinate2D WorldTourDestinations[] = {
}
NSArray *styleURLs = @[
- [MGLStyle streetsStyleURL],
- [MGLStyle emeraldStyleURL],
- [MGLStyle lightStyleURL],
- [MGLStyle darkStyleURL],
- [MGLStyle satelliteStyleURL],
- [MGLStyle hybridStyleURL],
+ [MGLStyle streetsStyleURLWithVersion:MGLStyleCurrentVersion],
+ [MGLStyle outdoorsStyleURLWithVersion:MGLStyleCurrentVersion],
+ [MGLStyle lightStyleURLWithVersion:MGLStyleCurrentVersion],
+ [MGLStyle darkStyleURLWithVersion:MGLStyleCurrentVersion],
+ [MGLStyle satelliteStyleURLWithVersion:MGLStyleCurrentVersion],
+ [MGLStyle hybridStyleURLWithVersion:MGLStyleCurrentVersion],
];
return [styleURLs indexOfObject:self.mapView.styleURL];
}