[core, android, ios, macos, qt] v10 default styles

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.
This commit is contained in:
Minh Nguyễn
2016-09-09 10:17:42 -07:00
committed by Minh Nguyễn
parent 78af1c6625
commit ed54849e99
11 changed files with 22 additions and 21 deletions

View File

@@ -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
@@ -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";
}

View File

@@ -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>

View File

@@ -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 -->
@@ -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>

View File

@@ -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>

View File

@@ -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"/>

View File

@@ -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.

View File

@@ -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

View File

@@ -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

View File

@@ -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))
@@ -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))

View File

@@ -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))

View File

@@ -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"));
}