summaryrefslogtreecommitdiff
path: root/platform/android
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2017-05-08 17:45:22 -0700
committerMinh Nguyễn <mxn@1ec5.org>2017-05-11 18:57:39 -0700
commit4d6f54553d277c0af24a0b8ff03d2dd7e9284ca2 (patch)
tree40f1de50c3092d71f679c4341bd290daa46ec06e /platform/android
parent9e384b78fbcf46d66d390122eefdf273f91b314e (diff)
downloadqtlocation-mapboxgl-4d6f54553d277c0af24a0b8ff03d2dd7e9284ca2.tar.gz
[core, android, ios, macos] Added Traffic Day/Night to default styles
The Styles API section of the Mapbox API Documentation site now lists Traffic Day v2 and Traffic Night v2, so this change adds those styles to all the places where styles are listed. Also switched iosapp and macosapp to unversioned style factory methods since MGLStyleDefaultVersion is no longer applicable for all styles.
Diffstat (limited to 'platform/android')
-rw-r--r--platform/android/CHANGELOG.md1
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/constants/Style.java20
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/res/values/strings.xml2
3 files changed, 22 insertions, 1 deletions
diff --git a/platform/android/CHANGELOG.md b/platform/android/CHANGELOG.md
index 4f12907f38..fdc6343b7c 100644
--- a/platform/android/CHANGELOG.md
+++ b/platform/android/CHANGELOG.md
@@ -37,6 +37,7 @@ Mapbox welcomes participation and contributions from everyone. If you'd like to
* Derived source attribution [#8630](https://github.com/mapbox/mapbox-gl-native/pull/8630)
* Consistent use of duration unit [#8578](https://github.com/mapbox/mapbox-gl-native/pull/8578)
* Swedish localization [#8883](https://github.com/mapbox/mapbox-gl-native/pull/8883)
+* Streets v10, Outdoors v10, Satellite Streets v10, Traffic Day v2, Traffic Night v2 [#6301](https://github.com/mapbox/mapbox-gl-native/pull/6301)
## 5.0.2 - April 3, 2017
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/constants/Style.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/constants/Style.java
index fae3bdde2c..77d0929df3 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/constants/Style.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/constants/Style.java
@@ -23,7 +23,7 @@ public class Style {
* constants means your map style will always use the latest version and may change as we
* improve the style
*/
- @StringDef( {MAPBOX_STREETS, OUTDOORS, LIGHT, DARK, SATELLITE, SATELLITE_STREETS})
+ @StringDef( {MAPBOX_STREETS, OUTDOORS, LIGHT, DARK, SATELLITE, SATELLITE_STREETS, TRAFFIC_DAY, TRAFFIC_NIGHT})
@Retention(RetentionPolicy.SOURCE)
public @interface StyleUrl {
}
@@ -67,4 +67,22 @@ public class Style {
* improve the style.
*/
public static final String SATELLITE_STREETS = "mapbox://styles/mapbox/satellite-streets-v10";
+
+ /**
+ * Traffic Day: Color-coded roads based on live traffic congestion data. Traffic data is currently
+ * available in
+ * <a href="https://www.mapbox.com/api-documentation/pages/traffic-countries.html">these select
+ * countries</a>. 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 TRAFFIC_DAY = "mapbox://styles/mapbox/traffic-day-v2";
+
+ /**
+ * Traffic Night: Color-coded roads based on live traffic congestion data, designed to maximize
+ * legibility in low-light situations. Traffic data is currently available in
+ * <a href="https://www.mapbox.com/api-documentation/pages/traffic-countries.html">these select
+ * countries</a>. 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 TRAFFIC_NIGHT = "mapbox://styles/mapbox/traffic-night-v2";
}
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/values/strings.xml b/platform/android/MapboxGLAndroidSDK/src/main/res/values/strings.xml
index 7adc29e2de..65fb3e14a3 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/res/values/strings.xml
+++ b/platform/android/MapboxGLAndroidSDK/src/main/res/values/strings.xml
@@ -24,4 +24,6 @@
<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-v10</string>
+ <string name="mapbox_style_traffic_day" translatable="false">mapbox://styles/mapbox/traffic-day-v2</string>
+ <string name="mapbox_style_traffic_night" translatable="false">mapbox://styles/mapbox/traffic-night-v2</string>
</resources>