summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/mbgl/util/default_styles.hpp4
-rw-r--r--platform/darwin/src/MGLStyle.h12
-rw-r--r--platform/darwin/src/MGLStyle.mm12
-rw-r--r--platform/darwin/test/MGLStyleTests.mm2
-rw-r--r--platform/ios/CHANGELOG.md1
-rw-r--r--platform/ios/app/MBXViewController.m4
-rw-r--r--platform/osx/app/Base.lproj/MainMenu.xib2
-rw-r--r--platform/osx/app/Base.lproj/MapDocument.xib6
-rw-r--r--platform/osx/app/MapDocument.m6
-rw-r--r--src/mbgl/util/default_styles.cpp12
10 files changed, 36 insertions, 25 deletions
diff --git a/include/mbgl/util/default_styles.hpp b/include/mbgl/util/default_styles.hpp
index 2043dd3f5b..05015ab4c9 100644
--- a/include/mbgl/util/default_styles.hpp
+++ b/include/mbgl/util/default_styles.hpp
@@ -18,10 +18,10 @@ extern const DefaultStyle outdoors;
extern const DefaultStyle light;
extern const DefaultStyle dark;
extern const DefaultStyle satellite;
-extern const DefaultStyle hybrid;
+extern const DefaultStyle satelliteStreets;
const DefaultStyle orderedStyles[] = {
- streets, outdoors, light, dark, satellite, hybrid,
+ streets, outdoors, light, dark, satellite, satelliteStreets,
};
const size_t numOrderedStyles = sizeof(orderedStyles) / sizeof(DefaultStyle);
diff --git a/platform/darwin/src/MGLStyle.h b/platform/darwin/src/MGLStyle.h
index 798bc1cf12..124954fee4 100644
--- a/platform/darwin/src/MGLStyle.h
+++ b/platform/darwin/src/MGLStyle.h
@@ -99,20 +99,20 @@ static const NSInteger MGLStyleCurrentVersion = 9;
+ (NSURL *)satelliteStyleURLWithVersion:(NSInteger)version;
/**
- Returns the URL to version 8 of the Hybrid style.
+ Returns the URL to version 8 of the Satellite Streets style.
- Mapbox Hybrid combines the global satellite and aerial imagery of Mapbox Satellite with unobtrusive labels.
+ Mapbox Satellite Streets combines the global satellite and aerial imagery of Mapbox Satellite with unobtrusive labels and translucent roads from Mapbox Streets.
*/
-+ (NSURL *)hybridStyleURL __attribute__((deprecated("Use -hybridStyleURLWithVersion:.")));
++ (NSURL *)hybridStyleURL __attribute__((deprecated("Use -satelliteStreetsStyleURLWithVersion:.")));
/**
- Returns the URL to the given version of the Hybrid style.
+ Returns the URL to the given version of the Satellite Streets style.
- Mapbox Hybrid combines the global satellite and aerial imagery of Mapbox Satellite with unobtrusive labels.
+ Mapbox Satellite Streets combines the global satellite and aerial imagery of Mapbox Satellite with unobtrusive labels and translucent roads from Mapbox Streets.
@param version The style’s latest released version. The current version is given by `MGLStyleCurrentVersion`.
*/
-+ (NSURL *)hybridStyleURLWithVersion:(NSInteger)version;
++ (NSURL *)satelliteStreetsStyleURLWithVersion:(NSInteger)version;
- (instancetype)init NS_UNAVAILABLE;
diff --git a/platform/darwin/src/MGLStyle.mm b/platform/darwin/src/MGLStyle.mm
index c0d8714878..13404c8d08 100644
--- a/platform/darwin/src/MGLStyle.mm
+++ b/platform/darwin/src/MGLStyle.mm
@@ -27,13 +27,23 @@ MGL_DEFINE_STYLE(outdoors, outdoors)
MGL_DEFINE_STYLE(light, light)
MGL_DEFINE_STYLE(dark, dark)
MGL_DEFINE_STYLE(satellite, satellite)
-MGL_DEFINE_STYLE(hybrid, satellite-hybrid)
+MGL_DEFINE_STYLE(satelliteStreets, satellite-streets)
// Make sure all the styles listed in mbgl::util::default_styles::orderedStyles
// are defined above and also declared in MGLStyle.h.
static_assert(6 == mbgl::util::default_styles::numOrderedStyles,
"mbgl::util::default_styles::orderedStyles and MGLStyle have different numbers of styles.");
+// Hybrid has been renamed Satellite Streets, so the last Hybrid version is hard-coded here.
+static NSURL *MGLStyleURL_hybrid;
++ (NSURL *)hybridStyleURL {
+ static dispatch_once_t onceToken;
+ dispatch_once(&onceToken, ^{
+ MGLStyleURL_hybrid = [NSURL URLWithString:@"mapbox://styles/mapbox/satellite-hybrid-v8"];
+ });
+ return MGLStyleURL_hybrid;
+}
+
// Emerald is no longer getting new versions as a default style, so the current version is hard-coded here.
static NSURL *MGLStyleURL_emerald;
+ (NSURL *)emeraldStyleURL {
diff --git a/platform/darwin/test/MGLStyleTests.mm b/platform/darwin/test/MGLStyleTests.mm
index 9d5555c11f..c8fc802e00 100644
--- a/platform/darwin/test/MGLStyleTests.mm
+++ b/platform/darwin/test/MGLStyleTests.mm
@@ -32,7 +32,7 @@
XCTAssertEqualObjects([MGLStyle lightStyleURLWithVersion:MGLStyleCurrentVersion].absoluteString, @(mbgl::util::default_styles::light.url));
XCTAssertEqualObjects([MGLStyle darkStyleURLWithVersion:MGLStyleCurrentVersion].absoluteString, @(mbgl::util::default_styles::dark.url));
XCTAssertEqualObjects([MGLStyle satelliteStyleURLWithVersion:MGLStyleCurrentVersion].absoluteString, @(mbgl::util::default_styles::satellite.url));
- XCTAssertEqualObjects([MGLStyle hybridStyleURLWithVersion:MGLStyleCurrentVersion].absoluteString, @(mbgl::util::default_styles::hybrid.url));
+ XCTAssertEqualObjects([MGLStyle satelliteStreetsStyleURLWithVersion:MGLStyleCurrentVersion].absoluteString, @(mbgl::util::default_styles::satelliteStreets.url));
static_assert(6 == mbgl::util::default_styles::numOrderedStyles,
"MGLStyleTests isn’t testing all the styles in mbgl::util::default_styles.");
diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md
index db39bc5d7a..e39c7a11bd 100644
--- a/platform/ios/CHANGELOG.md
+++ b/platform/ios/CHANGELOG.md
@@ -9,6 +9,7 @@ Mapbox welcomes participation and contributions from everyone. Please read [CON
- Existing MGLStyle class methods that return default style URLs have been deprecated in favor of new methods that require an explicit style version parameter. The deprecated, unversioned methods continue to return version 8 of the respective styles and will not be updated as new versions of the styles are released. ([#4759](https://github.com/mapbox/mapbox-gl-native/pull/4759))
- Deprecated `+[MGLStyle emeraldStyleURL]` with no replacement method. To use the Emerald style going forward, we recommend that you use the underlying URL. ([#4759](https://github.com/mapbox/mapbox-gl-native/pull/4759))
- Added `+[MGLStyle outdoorsStyleURLWithVersion:]` for the new Outdoors style. ([#4759](https://github.com/mapbox/mapbox-gl-native/pull/4759))
+- The Hybrid style is now called Satellite Streets. ([#4759](https://github.com/mapbox/mapbox-gl-native/pull/4759))
- The user dot now moves smoothly between user location updates while user location tracking is disabled. ([#1582](https://github.com/mapbox/mapbox-gl-native/pull/1582))
- An MGLAnnotation can be relocated by changing its `coordinate` property in a KVO-compliant way. An MGLMultiPoint cannot be relocated. ([#3835](https://github.com/mapbox/mapbox-gl-native/pull/3835))
- Setting the `image` property of an MGLAnnotationImage to `nil` resets it to the default red pin image and reclaims resources that can be used to customize additional annotations. ([#3835](https://github.com/mapbox/mapbox-gl-native/pull/3835))
diff --git a/platform/ios/app/MBXViewController.m b/platform/ios/app/MBXViewController.m
index 9b1d3d43bb..791fe0d7bf 100644
--- a/platform/ios/app/MBXViewController.m
+++ b/platform/ios/app/MBXViewController.m
@@ -479,7 +479,7 @@ static const CLLocationCoordinate2D WorldTourDestinations[] = {
@"Light",
@"Dark",
@"Satellite",
- @"Hybrid",
+ @"Satellite Streets",
];
styleURLs = @[
[MGLStyle streetsStyleURLWithVersion:MGLStyleCurrentVersion],
@@ -487,7 +487,7 @@ static const CLLocationCoordinate2D WorldTourDestinations[] = {
[MGLStyle lightStyleURLWithVersion:MGLStyleCurrentVersion],
[MGLStyle darkStyleURLWithVersion:MGLStyleCurrentVersion],
[MGLStyle satelliteStyleURLWithVersion:MGLStyleCurrentVersion],
- [MGLStyle hybridStyleURLWithVersion:MGLStyleCurrentVersion],
+ [MGLStyle satelliteStreetsStyleURLWithVersion:MGLStyleCurrentVersion],
];
NSAssert(styleNames.count == styleURLs.count, @"Style names and URLs don’t match.");
diff --git a/platform/osx/app/Base.lproj/MainMenu.xib b/platform/osx/app/Base.lproj/MainMenu.xib
index 03302ac932..1e11abb9ff 100644
--- a/platform/osx/app/Base.lproj/MainMenu.xib
+++ b/platform/osx/app/Base.lproj/MainMenu.xib
@@ -390,7 +390,7 @@
<action selector="setStyle:" target="-1" id="GXt-oK-Hy1"/>
</connections>
</menuItem>
- <menuItem title="Hybrid" tag="6" keyEquivalent="6" id="9BL-00-HFt">
+ <menuItem title="Satellite Streets" tag="6" keyEquivalent="6" id="9BL-00-HFt">
<connections>
<action selector="setStyle:" target="-1" id="oL4-AC-waq"/>
</connections>
diff --git a/platform/osx/app/Base.lproj/MapDocument.xib b/platform/osx/app/Base.lproj/MapDocument.xib
index 5b7e37936f..e6891098d8 100644
--- a/platform/osx/app/Base.lproj/MapDocument.xib
+++ b/platform/osx/app/Base.lproj/MapDocument.xib
@@ -59,9 +59,9 @@
<toolbarItem implicitItemIdentifier="BA3542AF-D63A-4893-9CC7-8F67EF2E82B0" label="Style" paletteLabel="Style" id="u23-0z-Otl" customClass="ValidatedToolbarItem">
<nil key="toolTip"/>
<size key="minSize" width="100" height="26"/>
- <size key="maxSize" width="100" height="26"/>
+ <size key="maxSize" width="120" height="26"/>
<popUpButton key="view" verticalHuggingPriority="750" id="Tzm-Cy-dQg">
- <rect key="frame" x="0.0" y="14" width="100" height="26"/>
+ <rect key="frame" x="0.0" y="14" width="120" height="26"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<popUpButtonCell key="cell" type="roundTextured" title="Streets" bezelStyle="texturedRounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="border" tag="1" imageScaling="proportionallyDown" inset="2" selectedItem="wvt-tP-O3a" id="3PJ-qK-Oh3">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
@@ -77,7 +77,7 @@
<menuItem title="Satellite" tag="5" id="CTe-e2-o42">
<modifierMask key="keyEquivalentModifierMask"/>
</menuItem>
- <menuItem title="Hybrid" tag="6" id="7ly-oA-0ND">
+ <menuItem title="Satellite Streets" tag="6" id="7ly-oA-0ND">
<modifierMask key="keyEquivalentModifierMask"/>
</menuItem>
</items>
diff --git a/platform/osx/app/MapDocument.m b/platform/osx/app/MapDocument.m
index 9a32302f87..64f814dd28 100644
--- a/platform/osx/app/MapDocument.m
+++ b/platform/osx/app/MapDocument.m
@@ -135,7 +135,7 @@ static const CLLocationCoordinate2D WorldTourDestinations[] = {
styleURL = [MGLStyle satelliteStyleURLWithVersion:MGLStyleCurrentVersion];
break;
case 6:
- styleURL = [MGLStyle hybridStyleURLWithVersion:MGLStyleCurrentVersion];
+ styleURL = [MGLStyle satelliteStreetsStyleURLWithVersion:MGLStyleCurrentVersion];
break;
default:
NSAssert(NO, @"Cannot set style from control with tag %li", (long)tag);
@@ -462,7 +462,7 @@ static const CLLocationCoordinate2D WorldTourDestinations[] = {
state = [styleURL isEqual:[MGLStyle satelliteStyleURLWithVersion:MGLStyleCurrentVersion]];
break;
case 6:
- state = [styleURL isEqual:[MGLStyle hybridStyleURLWithVersion:MGLStyleCurrentVersion]];
+ state = [styleURL isEqual:[MGLStyle satelliteStreetsStyleURLWithVersion:MGLStyleCurrentVersion]];
break;
default:
return NO;
@@ -562,7 +562,7 @@ static const CLLocationCoordinate2D WorldTourDestinations[] = {
[MGLStyle lightStyleURLWithVersion:MGLStyleCurrentVersion],
[MGLStyle darkStyleURLWithVersion:MGLStyleCurrentVersion],
[MGLStyle satelliteStyleURLWithVersion:MGLStyleCurrentVersion],
- [MGLStyle hybridStyleURLWithVersion:MGLStyleCurrentVersion],
+ [MGLStyle satelliteStreetsStyleURLWithVersion:MGLStyleCurrentVersion],
];
return [styleURLs indexOfObject:self.mapView.styleURL];
}
diff --git a/src/mbgl/util/default_styles.cpp b/src/mbgl/util/default_styles.cpp
index 247b7320eb..17cc2f5740 100644
--- a/src/mbgl/util/default_styles.cpp
+++ b/src/mbgl/util/default_styles.cpp
@@ -4,12 +4,12 @@ namespace mbgl {
namespace util {
namespace default_styles {
-const DefaultStyle streets = { "mapbox://styles/mapbox/streets-v9", "Streets" };
-const DefaultStyle outdoors = { "mapbox://styles/mapbox/outdoors-v9", "Outdoors" };
-const DefaultStyle light = { "mapbox://styles/mapbox/light-v9", "Light" };
-const DefaultStyle dark = { "mapbox://styles/mapbox/dark-v9", "Dark" };
-const DefaultStyle satellite = { "mapbox://styles/mapbox/satellite-v9", "Satellite" };
-const DefaultStyle hybrid = { "mapbox://styles/mapbox/satellite-hybrid-v9", "Hybrid" };
+const DefaultStyle streets = { "mapbox://styles/mapbox/streets-v9", "Streets" };
+const DefaultStyle outdoors = { "mapbox://styles/mapbox/outdoors-v9", "Outdoors" };
+const DefaultStyle light = { "mapbox://styles/mapbox/light-v9", "Light" };
+const DefaultStyle dark = { "mapbox://styles/mapbox/dark-v9", "Dark" };
+const DefaultStyle satellite = { "mapbox://styles/mapbox/satellite-v9", "Satellite" };
+const DefaultStyle satelliteStreets = { "mapbox://styles/mapbox/satellite-streets-v9", "Satellite Streets" };
} // namespace default_styles
} // end namespace util