diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2017-03-30 17:01:52 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2017-03-31 14:17:33 -0700 |
commit | 1a9bccbb850c637583c18e7409e3b87a0dd9ff79 (patch) | |
tree | cd158e3a469bfcbb1fbeab8efca43fc8ef698765 /platform/android/MapboxGLAndroidSDKTestApp | |
parent | 743d95405363e0eea1b80e8c28bde245211f7868 (diff) | |
download | qtlocation-mapboxgl-1a9bccbb850c637583c18e7409e3b87a0dd9ff79.tar.gz |
[core] Add DDS support for icon-image
Diffstat (limited to 'platform/android/MapboxGLAndroidSDKTestApp')
-rw-r--r-- | platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/SymbolLayerTest.java | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/SymbolLayerTest.java b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/SymbolLayerTest.java index 4c63509798..e8af375d66 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/SymbolLayerTest.java +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/SymbolLayerTest.java @@ -495,6 +495,51 @@ public class SymbolLayerTest extends BaseStyleTest { @Test + public void testIconImageAsIdentitySourceFunction() { + checkViewIsDisplayed(R.id.mapView); + Timber.i("icon-image"); + assertNotNull(layer); + + // Set + layer.setProperties( + iconImage(property("FeaturePropertyA", Stops.<String>identity())) + ); + + // Verify + assertNotNull(layer.getIconImage()); + assertNotNull(layer.getIconImage().getFunction()); + assertEquals(SourceFunction.class, layer.getIconImage().getFunction().getClass()); + assertEquals("FeaturePropertyA", ((SourceFunction) layer.getIconImage().getFunction()).getProperty()); + assertEquals(IdentityStops.class, layer.getIconImage().getFunction().getStops().getClass()); + } + + @Test + public void testIconImageAsIntervalSourceFunction() { + checkViewIsDisplayed(R.id.mapView); + Timber.i("icon-image"); + assertNotNull(layer); + + // Set + layer.setProperties( + iconImage( + property( + "FeaturePropertyA", + interval( + stop(1, iconImage("undefined")) + ) + ) + ) + ); + + // Verify + assertNotNull(layer.getIconImage()); + assertNotNull(layer.getIconImage().getFunction()); + assertEquals(SourceFunction.class, layer.getIconImage().getFunction().getClass()); + assertEquals("FeaturePropertyA", ((SourceFunction) layer.getIconImage().getFunction()).getProperty()); + assertEquals(IntervalStops.class, layer.getIconImage().getFunction().getStops().getClass()); + } + + @Test public void testIconRotateAsConstant() { checkViewIsDisplayed(R.id.mapView); Timber.i("icon-rotate"); |