diff options
author | Ivo van Dongen <info@ivovandongen.nl> | 2016-08-16 10:10:44 +0200 |
---|---|---|
committer | Ivo van Dongen <info@ivovandongen.nl> | 2016-08-16 10:53:34 +0200 |
commit | c34130ac6d968a3ff636af71e19893d22c2faa99 (patch) | |
tree | 8e580d975de1ec4591f5887ffc614811ee64fc34 | |
parent | 1daba5d04b5f6a704a1ee608b64b7bb42101903f (diff) | |
download | qtlocation-mapboxgl-c34130ac6d968a3ff636af71e19893d22c2faa99.tar.gz |
[android] #6014 - add example with numerical filter
2 files changed, 4 insertions, 4 deletions
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/RuntimeStyleActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/RuntimeStyleActivity.java index 481b0d7cec..c36b6b49fa 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/RuntimeStyleActivity.java +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/RuntimeStyleActivity.java @@ -39,7 +39,7 @@ import java.io.Reader; import java.io.StringWriter; import java.io.Writer; -import static com.mapbox.mapboxsdk.style.layers.Filter.eq; +import static com.mapbox.mapboxsdk.style.layers.Filter.*; import static com.mapbox.mapboxsdk.style.layers.Function.Stop; import static com.mapbox.mapboxsdk.style.layers.Function.stop; import static com.mapbox.mapboxsdk.style.layers.Function.zoom; @@ -244,8 +244,8 @@ public class RuntimeStyleActivity extends AppCompatActivity { fillAntialias(true) ); - //Only show me parks - layer.setFilter(eq("type", "park")); + //Only show me parks (except westerpark with stroke-width == 3) + layer.setFilter(all(eq("type", "park"), eq("stroke-width", 2))); mapboxMap.addLayer(layer, "building"); //layer.setPaintProperty(fillColor(Color.RED)); //XXX But not after the object is attached diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/raw/amsterdam.geojson b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/raw/amsterdam.geojson index 2629a7c3c4..c5585533a0 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/raw/amsterdam.geojson +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/res/raw/amsterdam.geojson @@ -5,7 +5,7 @@ "type": "Feature", "properties": { "stroke": "#555555", - "stroke-width": 2, + "stroke-width": 3, "stroke-opacity": 1, "fill": "#555555", "fill-opacity": 0.5, |