Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[core, android, ios, macos, qt] v10 default styles
Browse files Browse the repository at this point in the history
Upgraded from v9 default styles to v10 wherever the developer expects to get the latest and greatest, as well as in a couple tests where it may be beneficial to ensure that we can handle a two-digit version number in the style URL.
  • Loading branch information
1ec5 committed May 12, 2017
1 parent 78af1c6 commit ed54849
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ public class Style {
* constant means your map style will always use the latest version and may change as we
* improve the style.
*/
public static final String MAPBOX_STREETS = "mapbox://styles/mapbox/streets-v9";
public static final String MAPBOX_STREETS = "mapbox://styles/mapbox/streets-v10";

/**
* Outdoors: A general-purpose style tailored to outdoor activities. Using this constant means
* your map style will always use the latest version and may change as we improve the style.
*/
public static final String OUTDOORS = "mapbox://styles/mapbox/outdoors-v9";
public static final String OUTDOORS = "mapbox://styles/mapbox/outdoors-v10";

/**
* Light: Subtle light backdrop for data visualizations. Using this constant means your map
Expand All @@ -66,5 +66,5 @@ public class Style {
* constant means your map style will always use the latest version and may change as we
* improve the style.
*/
public static final String SATELLITE_STREETS = "mapbox://styles/mapbox/satellite-streets-v9";
public static final String SATELLITE_STREETS = "mapbox://styles/mapbox/satellite-streets-v10";
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
<!-- these are public -->
<!-- Using one of these constants means your map style will always use the latest version and
may change as we improve the style. -->
<string name="mapbox_style_mapbox_streets" translatable="false">mapbox://styles/mapbox/streets-v9</string>
<string name="mapbox_style_outdoors" translatable="false">mapbox://styles/mapbox/outdoors-v9</string>
<string name="mapbox_style_mapbox_streets" translatable="false">mapbox://styles/mapbox/streets-v10</string>
<string name="mapbox_style_outdoors" translatable="false">mapbox://styles/mapbox/outdoors-v10</string>
<string name="mapbox_style_light" translatable="false">mapbox://styles/mapbox/light-v9</string>
<string name="mapbox_style_dark" translatable="false">mapbox://styles/mapbox/dark-v9</string>
<string name="mapbox_style_satellite" translatable="false">mapbox://styles/mapbox/satellite-v9</string>
<string name="mapbox_style_satellite_streets" translatable="false">mapbox://styles/mapbox/satellite-streets-v9</string>
<string name="mapbox_style_satellite_streets" translatable="false">mapbox://styles/mapbox/satellite-streets-v10</string>
</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
android:layout_weight="0.5"
mapbox:center_latitude="38.913187"
mapbox:center_longitude="-77.032546"
mapbox:style_url="mapbox://styles/mapbox/streets-v9"
mapbox:style_url="mapbox://styles/mapbox/streets-v10"
mapbox:zoom="12"/>

<!-- SF -->
Expand All @@ -35,7 +35,7 @@
android:layout_weight="0.5"
mapbox:center_latitude="37.775732"
mapbox:center_longitude="-122.413985"
mapbox:style_url="mapbox://styles/mapbox/outdoors-v9"
mapbox:style_url="mapbox://styles/mapbox/outdoors-v10"
mapbox:zoom="13"/>
</LinearLayout>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
mapbox:mapbox_cameraTargetLng="-122.3421"
mapbox:mapbox_cameraZoom="11"
mapbox:mapbox_renderTextureMode="true"
mapbox:mapbox_styleUrl="mapbox://styles/mapbox/streets-v9" />
mapbox:mapbox_styleUrl="mapbox://styles/mapbox/streets-v10" />

</LinearLayout>
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
android:layout_height="match_parent"
mapbox:mapbox_cameraTargetLat="40.73581"
mapbox:mapbox_cameraTargetLng="-73.99155"
mapbox:mapbox_styleUrl="mapbox://styles/mapbox/streets-v9"
mapbox:mapbox_styleUrl="mapbox://styles/mapbox/streets-v10"
mapbox:mapbox_cameraZoom="11"
mapbox:mapbox_uiZoomControls="false"/>

Expand Down
2 changes: 1 addition & 1 deletion platform/darwin/src/MGLStyle.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ NS_ASSUME_NONNULL_BEGIN
the constant itself. Such details may change significantly from version to
version.
*/
static MGL_EXPORT const NSInteger MGLStyleDefaultVersion = 9;
static MGL_EXPORT const NSInteger MGLStyleDefaultVersion = 10;

/**
The proxy object for the current map style.
Expand Down
12 changes: 6 additions & 6 deletions platform/default/mbgl/util/default_styles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 satelliteStreets = { "mapbox://styles/mapbox/satellite-streets-v9", "Satellite Streets" };
const DefaultStyle streets = { "mapbox://styles/mapbox/streets-v10", "Streets" };
const DefaultStyle outdoors = { "mapbox://styles/mapbox/outdoors-v10", "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-v10", "Satellite Streets" };

} // namespace default_styles
} // end namespace util
Expand Down
2 changes: 1 addition & 1 deletion platform/default/mbgl/util/default_styles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const DefaultStyle orderedStyles[] = {
};
const size_t numOrderedStyles = sizeof(orderedStyles) / sizeof(DefaultStyle);

static const unsigned currentVersion = 9;
static const unsigned currentVersion = 10;

} // end namespace default_styles
} // end namespace util
Expand Down
2 changes: 1 addition & 1 deletion platform/ios/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONT
### Styles

* Added support for 3D extrusion of buildings and other polygonal features via the `MGLFillExtrusionStyleLayer` class and the `fill-extrusion` layer type in style JSON. ([#8431](https://github.com/mapbox/mapbox-gl-native/pull/8431))
* MGLMapView and MGLTilePyramidOfflineRegion now default to version 10 of the Mapbox Streets style. Similarly, several style URL class methods of MGLStyle return URLs to version 10 styles. ([#6301](https://github.com/mapbox/mapbox-gl-native/pull/6301))
* MGLSymbolStyleLayer’s `iconImageName`, `iconScale`, `textFontSize`, `textOffset`, and `textRotation` properties can now be set to a source or composite function. ([#8544](https://github.com/mapbox/mapbox-gl-native/pull/8544), [#8590](https://github.com/mapbox/mapbox-gl-native/pull/8590), [#8592](https://github.com/mapbox/mapbox-gl-native/pull/8592), [#8593](https://github.com/mapbox/mapbox-gl-native/pull/8593))
* Fixed an issue where setting the `MGLVectorStyleLayer.predicate` property failed to take effect if the relevant source was not in use by a visible layer at the time. ([#8653](https://github.com/mapbox/mapbox-gl-native/pull/8653))
* Fixed an issue causing a composite function’s highest zoom level stop to be misinterpreted. ([#8613](https://github.com/mapbox/mapbox-gl-native/pull/8613), [#8790](https://github.com/mapbox/mapbox-gl-native/pull/8790))
Expand Down Expand Up @@ -61,7 +62,6 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONT
### Styles

* Added support for data-driven styling in the form of source and composite style functions. `MGLStyleFunction` is now an abstract class, with `MGLCameraStyleFunction` providing the behavior of `MGLStyleFunction` in previous releases. New `MGLStyleFunction` subclasses allow you to vary a style attribute by the values of attributes of features in the source. ([#7596](https://github.com/mapbox/mapbox-gl-native/pull/7596))
* Added methods to MGLShapeSource and MGLVectorSource for querying features loaded by the source, whether or not they’re visible on the map. ([#8263](https://github.com/mapbox/mapbox-gl-native/pull/8263))
* Added `circleStrokeColor`, `circleStrokeWidth`, and `circleStrokeOpacity` properties to MGLCircleStyleLayer and support for corresponding properties in style JSON files. ([#7356](https://github.com/mapbox/mapbox-gl-native/pull/7356))
* Point-placed labels in symbol style layers are now placed at more optimal locations within polygons. ([#7465](https://github.com/mapbox/mapbox-gl-native/pull/7465))
* Fixed flickering that occurred when manipulating a style layer. ([#7616](https://github.com/mapbox/mapbox-gl-native/pull/7616))
Expand Down
1 change: 1 addition & 0 deletions platform/macos/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### Styles

* Added support for 3D extrusion of buildings and other polygonal features via the `MGLFillExtrusionStyleLayer` class and the `fill-extrusion` layer type in style JSON. ([#8431](https://github.com/mapbox/mapbox-gl-native/pull/8431))
* MGLMapView and MGLTilePyramidOfflineRegion now default to version 10 of the Mapbox Streets style. Similarly, several style URL class methods of MGLStyle return URLs to version 10 styles. ([#6301](https://github.com/mapbox/mapbox-gl-native/pull/6301))
* MGLSymbolStyleLayer’s `iconImageName`, `iconScale`, `textFontSize`, `textOffset`, and `textRotation` properties can now be set to a source or composite function. ([#8544](https://github.com/mapbox/mapbox-gl-native/pull/8544), [#8590](https://github.com/mapbox/mapbox-gl-native/pull/8590), [#8592](https://github.com/mapbox/mapbox-gl-native/pull/8592), [#8593](https://github.com/mapbox/mapbox-gl-native/pull/8593))
* Fixed an issue where setting the `MGLVectorStyleLayer.predicate` property failed to take effect if the relevant source was not in use by a visible layer at the time. ([#8653](https://github.com/mapbox/mapbox-gl-native/pull/8653))
* Fixed an issue causing a composite function’s highest zoom level stop to be misinterpreted. ([#8613](https://github.com/mapbox/mapbox-gl-native/pull/8613), [#8790](https://github.com/mapbox/mapbox-gl-native/pull/8790))
Expand Down
4 changes: 2 additions & 2 deletions test/util/mapbox.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ TEST(Mapbox, SpriteURL) {
"https://api.mapbox.com/styles/v1/mapbox/streets-v8/draft/sprite@2x.png?access_token=key",
mbgl::util::mapbox::normalizeSpriteURL(util::API_BASE_URL, "mapbox://sprites/mapbox/streets-v8/draft@2x.png", "key"));
EXPECT_EQ(
"https://api.mapbox.com/styles/v1/mapbox/streets-v9/sprite?access_token=key&fresh=true.png",
"https://api.mapbox.com/styles/v1/mapbox/streets-v10/sprite?access_token=key&fresh=true.png",
mbgl::util::mapbox::normalizeSpriteURL(util::API_BASE_URL,
"mapbox://sprites/mapbox/streets-v9?fresh=true.png",
"mapbox://sprites/mapbox/streets-v10?fresh=true.png",
"key"));
EXPECT_EQ("mapbox://////", mbgl::util::mapbox::normalizeSpriteURL(util::API_BASE_URL, "mapbox://////", "key"));
}
Expand Down

0 comments on commit ed54849

Please sign in to comment.