summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorLeith Bade <leith@mapbox.com>2015-10-23 10:31:27 +1100
committerLeith Bade <leith@mapbox.com>2015-10-23 14:09:24 +1100
commitf71d61fa912f27fa3ccbbdc42f4925f3f94ff01a (patch)
treee9f0e5491b5e7124dfc6a4cbdb09c71875cb32d3 /android
parent1f4144c65a2ff63182f04e34bfa2172cd8091aeb (diff)
downloadqtlocation-mapboxgl-f71d61fa912f27fa3ccbbdc42f4925f3f94ff01a.tar.gz
[android] Add missing satellite streets style to Android and iOS.
As well as default_styles.cpp Fixes #2739 Fixes #2740
Diffstat (limited to 'android')
-rw-r--r--android/java/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/constants/Style.java17
-rw-r--r--android/java/MapboxGLAndroidSDK/src/main/res-public/values/public.xml1
-rw-r--r--android/java/MapboxGLAndroidSDK/src/main/res/values/strings.xml1
-rw-r--r--android/java/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/MainActivity.java5
-rw-r--r--android/java/MapboxGLAndroidSDKTestApp/src/main/res/menu/menu_drawer.xml20
-rw-r--r--android/java/MapboxGLAndroidSDKTestApp/src/main/res/menu/menu_main.xml4
-rw-r--r--android/java/MapboxGLAndroidSDKTestApp/src/main/res/values/strings.xml1
7 files changed, 34 insertions, 15 deletions
diff --git a/android/java/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/constants/Style.java b/android/java/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/constants/Style.java
index 1b0b16bb7b..e2dad97832 100644
--- a/android/java/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/constants/Style.java
+++ b/android/java/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/constants/Style.java
@@ -18,7 +18,7 @@ public class Style {
/**
* Indicates the parameter accepts one of the values from {@link Style}.
*/
- @StringDef({MAPBOX_STREETS, EMERALD, LIGHT, DARK, SATELLITE})
+ @StringDef({MAPBOX_STREETS, EMERALD, LIGHT, DARK, SATELLITE, SATELLITE_STREETS})
@Retention(RetentionPolicy.SOURCE)
public @interface StyleUrl {
}
@@ -26,24 +26,29 @@ public class Style {
// IMPORTANT: If you change any of these you also need to edit them in strings.xml
/**
- * Mapbox Streets: Our signature style.
+ * Mapbox Streets: A complete basemap, perfect for incorporating your own data.
*/
public static final String MAPBOX_STREETS = "asset://styles/streets-v8.json";
/**
- * Emerald: Great for transportation and outdoor terrain.
+ * Emerald: A versatile style, with emphasis on road networks and public transit.
*/
public static final String EMERALD = "asset://styles/emerald-v8.json";
/**
- * Light: Light-colored style that is great for data overlay.
+ * Light: Subtle light backdrop for data visualizations.
*/
public static final String LIGHT = "asset://styles/light-v8.json";
/**
- * Dark: Dark-colored style that is great for data overlay.
+ * Dark: Subtle dark backdrop for data visualizations.
*/
public static final String DARK = "asset://styles/dark-v8.json";
/**
- * Satellite: The best-looking, most accurate, and most up-to-date satellite imagery available anywhere.
+ * Satellite: A beautiful global satellite and aerial imagery layer.
*/
public static final String SATELLITE = "asset://styles/satellite-v8.json";
+ /**
+ * Satellite Streets: Global satellite and aerial imagery with unobtrusive labels.
+ */
+ public static final String SATELLITE_STREETS = "asset://styles/satellite-hybrid-v8.json";
+
}
diff --git a/android/java/MapboxGLAndroidSDK/src/main/res-public/values/public.xml b/android/java/MapboxGLAndroidSDK/src/main/res-public/values/public.xml
index f6cb05662d..09dee3752a 100644
--- a/android/java/MapboxGLAndroidSDK/src/main/res-public/values/public.xml
+++ b/android/java/MapboxGLAndroidSDK/src/main/res-public/values/public.xml
@@ -8,6 +8,7 @@
<public name="style_light" type="string" />
<public name="style_dark" type="string" />
<public name="style_satellite" type="string" />
+ <public name="style_satellite_streets" type="string" />
<public name="center_longitude" type="attr" />
<public name="center_latitude" type="attr" />
diff --git a/android/java/MapboxGLAndroidSDK/src/main/res/values/strings.xml b/android/java/MapboxGLAndroidSDK/src/main/res/values/strings.xml
index a29d7de7ce..2786ea7b97 100644
--- a/android/java/MapboxGLAndroidSDK/src/main/res/values/strings.xml
+++ b/android/java/MapboxGLAndroidSDK/src/main/res/values/strings.xml
@@ -14,4 +14,5 @@
<string name="style_light">asset://styles/light-v8.json</string>
<string name="style_dark">asset://styles/dark-v8.json</string>
<string name="style_satellite">asset://styles/satellite-v8.json</string>
+ <string name="style_satellite_streets">asset://styles/satellite-hybrid-v8.json</string>
</resources>
diff --git a/android/java/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/MainActivity.java b/android/java/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/MainActivity.java
index 8f07729049..50c70b5f5e 100644
--- a/android/java/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/MainActivity.java
+++ b/android/java/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/MainActivity.java
@@ -382,6 +382,11 @@ public class MainActivity extends AppCompatActivity {
mSelectedStyle = id;
return true;
+ case R.id.actionStyleSatelliteStreets:
+ mMapView.setStyle(Style.SATELLITE_STREETS);
+ mSelectedStyle = id;
+ return true;
+
default:
return false;
}
diff --git a/android/java/MapboxGLAndroidSDKTestApp/src/main/res/menu/menu_drawer.xml b/android/java/MapboxGLAndroidSDKTestApp/src/main/res/menu/menu_drawer.xml
index 3b7602f3d6..5167182a44 100644
--- a/android/java/MapboxGLAndroidSDKTestApp/src/main/res/menu/menu_drawer.xml
+++ b/android/java/MapboxGLAndroidSDKTestApp/src/main/res/menu/menu_drawer.xml
@@ -1,8 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:id="@+id/mainActivityMenu"
- android:title="@string/navdrawer_menu_title_mainactivity_controls">
+ <item
+ android:id="@+id/mainActivityMenu"
+ android:title="@string/navdrawer_menu_title_mainactivity_controls">
<menu>
<group>
<item
@@ -25,11 +26,11 @@
<group android:id="@+id/stylesSeparator" />
- <item android:id="@+id/mainActivityStylesMenue"
+ <item
+ android:id="@+id/mainActivityStylesMenue"
android:title="@string/navdrawer_menu_title_mainactivity_styles">
<menu>
- <group
- android:id="@+id/stylesGroup">
+ <group android:id="@+id/stylesGroup">
<item
android:id="@+id/actionStyleMapboxStreets"
android:title="@string/styleMapboxStreets" />
@@ -50,6 +51,10 @@
android:id="@+id/actionStyleSatellite"
android:title="@string/styleSatellite" />
+ <item
+ android:id="@+id/actionStyleSatelliteStreets"
+ android:title="@string/styleSatelliteStreets" />
+
</group>
</menu>
</item>
@@ -68,9 +73,10 @@
-->
- <group android:id="@+id/testsSeparator"/>
+ <group android:id="@+id/testsSeparator" />
- <item android:id="@+id/testsMenu"
+ <item
+ android:id="@+id/testsMenu"
android:title="@string/navdrawer_menu_title_individual_tests">
<menu>
diff --git a/android/java/MapboxGLAndroidSDKTestApp/src/main/res/menu/menu_main.xml b/android/java/MapboxGLAndroidSDKTestApp/src/main/res/menu/menu_main.xml
index 014fa25d67..2c5178af08 100644
--- a/android/java/MapboxGLAndroidSDKTestApp/src/main/res/menu/menu_main.xml
+++ b/android/java/MapboxGLAndroidSDKTestApp/src/main/res/menu/menu_main.xml
@@ -1,3 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
-<menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto">
-</menu>
+<menu xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"></menu>
diff --git a/android/java/MapboxGLAndroidSDKTestApp/src/main/res/values/strings.xml b/android/java/MapboxGLAndroidSDKTestApp/src/main/res/values/strings.xml
index 4a4f0a115d..94c089146a 100644
--- a/android/java/MapboxGLAndroidSDKTestApp/src/main/res/values/strings.xml
+++ b/android/java/MapboxGLAndroidSDKTestApp/src/main/res/values/strings.xml
@@ -36,6 +36,7 @@
<string name="styleLight">Light</string>
<string name="styleDark">Dark</string>
<string name="styleSatellite">Satellite</string>
+ <string name="styleSatelliteStreets">Satellite Streets</string>
<string-array name="outdoors_class_list">
<item>Day</item>