summaryrefslogtreecommitdiff
path: root/platform/android/MapboxGLAndroidSDKTestApp/src/main/res
diff options
context:
space:
mode:
authorIvo van Dongen <info@ivovandongen.nl>2017-01-17 17:43:49 +0200
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-02-02 09:44:42 -0800
commitf562ecdfc3a08f7b9b0c2be938f237852a82d374 (patch)
tree71c3ceb4b2a877d124f4b069fa80156d701a6125 /platform/android/MapboxGLAndroidSDKTestApp/src/main/res
parent8a5bff8ee630673c6ebc496322eab94a41ae9353 (diff)
downloadqtlocation-mapboxgl-f562ecdfc3a08f7b9b0c2be938f237852a82d374.tar.gz
[android] data driven style implementation
Diffstat (limited to 'platform/android/MapboxGLAndroidSDKTestApp/src/main/res')
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_data_driven_style.xml12
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/menu/menu_data_driven_style.xml50
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/raw/amsterdam.geojson6
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/strings.xml2
4 files changed, 67 insertions, 3 deletions
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_data_driven_style.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_data_driven_style.xml
new file mode 100644
index 0000000000..7454ce5860
--- /dev/null
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/layout/activity_data_driven_style.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <com.mapbox.mapboxsdk.maps.MapView
+ android:id="@id/mapView"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"/>
+
+</RelativeLayout>
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/menu/menu_data_driven_style.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/menu/menu_data_driven_style.xml
new file mode 100644
index 0000000000..3eae56a273
--- /dev/null
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/menu/menu_data_driven_style.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+<menu xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:mapbox="http://schemas.android.com/apk/res-auto">
+
+ <item
+ android:id="@+id/action_add_exponential_zoom_function"
+ android:title="Add an exponential zoom function"
+ mapbox:showAsAction="never"/>
+
+ <item
+ android:id="@+id/action_add_interval_zoom_function"
+ android:title="Add an interval zoom function"
+ mapbox:showAsAction="never"/>
+
+ <item
+ android:id="@+id/action_add_categorical_source_function"
+ android:title="Add a categorical source function"
+ mapbox:showAsAction="never"/>
+
+ <item
+ android:id="@+id/action_add_exponential_source_function"
+ android:title="Add an exponential source function"
+ mapbox:showAsAction="never"/>
+
+ <item
+ android:id="@+id/action_add_identity_source_function"
+ android:title="Add an identity source function"
+ mapbox:showAsAction="never"/>
+
+ <item
+ android:id="@+id/action_add_interval_source_function"
+ android:title="Add an interval source function"
+ mapbox:showAsAction="never"/>
+
+ <item
+ android:id="@+id/action_add_composite_exponential_function"
+ android:title="Add a composite, exponential function"
+ mapbox:showAsAction="never"/>
+
+ <item
+ android:id="@+id/action_add_composite_categorical_function"
+ android:title="Add a composite, categorical function"
+ mapbox:showAsAction="never"/>
+
+ <item
+ android:id="@+id/action_add_composite_interval_function"
+ android:title="Add a composite, interval function"
+ mapbox:showAsAction="never"/>
+
+</menu>
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/raw/amsterdam.geojson b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/raw/amsterdam.geojson
index c5585533a0..e433a509eb 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/raw/amsterdam.geojson
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/raw/amsterdam.geojson
@@ -256,7 +256,7 @@
"stroke-width": 2,
"stroke-opacity": 1,
"fill": "#555555",
- "fill-opacity": 0.5,
+ "fill-opacity": 1.0,
"name": "Sarphatipark",
"type": "park",
"description": "Sarphatipark is a small park in the popular De Pijp neighbourhood. It was openend in late 19th century, and named after Samuel Sarphati."
@@ -482,7 +482,7 @@
"stroke-width": 2,
"stroke-opacity": 1,
"fill": "#555555",
- "fill-opacity": 0.5,
+ "fill-opacity": 0.1,
"name": "Sloterdijk",
"type": "area",
"description": "To protect the area around Sloten from the as-yet undrained IJ the Spaarndammerdijk was laid along the south bank of this inlet. In this vicinity at the same time, a dam on the Slochter (or Slooter) river was built, the Slooterdam. Trade grew in the vicinity, and in the 15th century a weigh house and a church were built. The area is nowadays best known as a large intersection of train lines and a business and industrial centre north-west of Amsterdam."
@@ -574,7 +574,7 @@
"stroke-width": 2,
"stroke-opacity": 1,
"fill": "#555555",
- "fill-opacity": 0.5,
+ "fill-opacity": 0.7,
"name": "Artis",
"type": "poi",
"description": "Artis, short for Natura Artis Magistra (Latin for \"Nature is the teacher of art and science\"), is a zoo in the centre of Amsterdam. It is the oldest zoo in the Netherlands and one of the oldest zoos of mainland Europe. Artis Royal Zoo is not just a zoo, it also contains an aquarium and a planetarium. Artis also has an arboretum and a fairly large art collection. A part of the art collection is on display in the Aquarium building of the zoo. Artis contains 27 monumental buildings, most of which are used as enclosures for the animals, making Artis a unique cultural heritage of the 19th century."
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/strings.xml b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/strings.xml
index fdfad800d6..aa36616373 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/strings.xml
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/values/strings.xml
@@ -49,6 +49,7 @@
<string name="activity_minmax_zoom">Min/Max Zoom</string>
<string name="activity_viewpager">ViewPager</string>
<string name="activity_runtime_style">Runtime Style</string>
+ <string name="activity_data_driven_style">Data Driven Style</string>
<string name="activity_circle_layer">Circle layer</string>
<string name="activity_style_file">Local Style file</string>
<string name="activity_geojson_clustering">GeoJson Clustering</string>
@@ -100,6 +101,7 @@
<string name="description_dynamic_info_window_adapter">Learn how to create a dynamic custom InfoWindow</string>
<string name="description_viewpager">Use SupportMapFragments in a ViewPager</string>
<string name="description_runtime_style">Adopt the map style on the fly</string>
+ <string name="description_data_driven_style">Use functions to change the map appearance</string>
<string name="description_symbol_layer">Manipulate symbols at runtime</string>
<string name="description_custom_sprite">Use a custom sprite in a Symbol Layer</string>
<string name="description_geojson_clustering">Use GeoJson sources and dynamic layers to cluster information</string>