summaryrefslogtreecommitdiff
path: root/platform/android/MapboxGLAndroidSDKTestApp/src
diff options
context:
space:
mode:
authorTobrun <tobrun@mapbox.com>2017-03-31 17:51:26 +0200
committerGitHub <noreply@github.com>2017-03-31 17:51:26 +0200
commit939526bac4aff734be4e6382b64c43214eb0bc9b (patch)
treeb286e7b2b72b4776d2adfed628e0bebf38ec9710 /platform/android/MapboxGLAndroidSDKTestApp/src
parent05992c47aca0c83d5c0abc79c8e7833d69d24803 (diff)
downloadqtlocation-mapboxgl-939526bac4aff734be4e6382b64c43214eb0bc9b.tar.gz
[android] - transition options for layer properties (#8509)
[android] fixup highlevel bindings for transition options finish integration
Diffstat (limited to 'platform/android/MapboxGLAndroidSDKTestApp/src')
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/BackgroundLayerTest.java38
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/CircleLayerTest.java100
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/FillLayerTest.java64
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/LineLayerTest.java115
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/RasterLayerTest.java86
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/SymbolLayerTest.java182
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/layer.junit.ejs16
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/RuntimeStyleActivity.java12
8 files changed, 609 insertions, 4 deletions
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/BackgroundLayerTest.java b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/BackgroundLayerTest.java
index 510f477bce..4f94dcc28b 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/BackgroundLayerTest.java
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/BackgroundLayerTest.java
@@ -36,6 +36,8 @@ import static org.junit.Assert.*;
import static com.mapbox.mapboxsdk.style.layers.Property.*;
import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.*;
+import com.mapbox.mapboxsdk.style.layers.TransitionOptions;
+
/**
* Basic smoke tests for BackgroundLayer
*/
@@ -76,6 +78,18 @@ public class BackgroundLayerTest extends BaseStyleTest {
}
@Test
+ public void testBackgroundColorTransition() {
+ checkViewIsDisplayed(R.id.mapView);
+ Timber.i("background-colorTransitionOptions");
+ assertNotNull(layer);
+
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setBackgroundColorTransition(options);
+ assertEquals(layer.getBackgroundColorTransition(), options);
+ }
+
+ @Test
public void testBackgroundColorAsConstant() {
checkViewIsDisplayed(R.id.mapView);
Timber.i("background-color");
@@ -124,6 +138,18 @@ public class BackgroundLayerTest extends BaseStyleTest {
}
@Test
+ public void testBackgroundPatternTransition() {
+ checkViewIsDisplayed(R.id.mapView);
+ Timber.i("background-patternTransitionOptions");
+ assertNotNull(layer);
+
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setBackgroundPatternTransition(options);
+ assertEquals(layer.getBackgroundPatternTransition(), options);
+ }
+
+ @Test
public void testBackgroundPatternAsConstant() {
checkViewIsDisplayed(R.id.mapView);
Timber.i("background-pattern");
@@ -160,6 +186,18 @@ public class BackgroundLayerTest extends BaseStyleTest {
}
@Test
+ public void testBackgroundOpacityTransition() {
+ checkViewIsDisplayed(R.id.mapView);
+ Timber.i("background-opacityTransitionOptions");
+ assertNotNull(layer);
+
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setBackgroundOpacityTransition(options);
+ assertEquals(layer.getBackgroundOpacityTransition(), options);
+ }
+
+ @Test
public void testBackgroundOpacityAsConstant() {
checkViewIsDisplayed(R.id.mapView);
Timber.i("background-opacity");
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/CircleLayerTest.java b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/CircleLayerTest.java
index a8f35356b5..7b8a03fb35 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/CircleLayerTest.java
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/CircleLayerTest.java
@@ -36,6 +36,8 @@ import static org.junit.Assert.*;
import static com.mapbox.mapboxsdk.style.layers.Property.*;
import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.*;
+import com.mapbox.mapboxsdk.style.layers.TransitionOptions;
+
/**
* Basic smoke tests for CircleLayer
*/
@@ -82,6 +84,18 @@ public class CircleLayerTest extends BaseStyleTest {
}
@Test
+ public void testCircleRadiusTransition() {
+ checkViewIsDisplayed(R.id.mapView);
+ Timber.i("circle-radiusTransitionOptions");
+ assertNotNull(layer);
+
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setCircleRadiusTransition(options);
+ assertEquals(layer.getCircleRadiusTransition(), options);
+ }
+
+ @Test
public void testCircleRadiusAsConstant() {
checkViewIsDisplayed(R.id.mapView);
Timber.i("circle-radius");
@@ -227,6 +241,18 @@ public class CircleLayerTest extends BaseStyleTest {
}
@Test
+ public void testCircleColorTransition() {
+ checkViewIsDisplayed(R.id.mapView);
+ Timber.i("circle-colorTransitionOptions");
+ assertNotNull(layer);
+
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setCircleColorTransition(options);
+ assertEquals(layer.getCircleColorTransition(), options);
+ }
+
+ @Test
public void testCircleColorAsConstant() {
checkViewIsDisplayed(R.id.mapView);
Timber.i("circle-color");
@@ -349,6 +375,18 @@ public class CircleLayerTest extends BaseStyleTest {
}
@Test
+ public void testCircleBlurTransition() {
+ checkViewIsDisplayed(R.id.mapView);
+ Timber.i("circle-blurTransitionOptions");
+ assertNotNull(layer);
+
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setCircleBlurTransition(options);
+ assertEquals(layer.getCircleBlurTransition(), options);
+ }
+
+ @Test
public void testCircleBlurAsConstant() {
checkViewIsDisplayed(R.id.mapView);
Timber.i("circle-blur");
@@ -494,6 +532,18 @@ public class CircleLayerTest extends BaseStyleTest {
}
@Test
+ public void testCircleOpacityTransition() {
+ checkViewIsDisplayed(R.id.mapView);
+ Timber.i("circle-opacityTransitionOptions");
+ assertNotNull(layer);
+
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setCircleOpacityTransition(options);
+ assertEquals(layer.getCircleOpacityTransition(), options);
+ }
+
+ @Test
public void testCircleOpacityAsConstant() {
checkViewIsDisplayed(R.id.mapView);
Timber.i("circle-opacity");
@@ -639,6 +689,18 @@ public class CircleLayerTest extends BaseStyleTest {
}
@Test
+ public void testCircleTranslateTransition() {
+ checkViewIsDisplayed(R.id.mapView);
+ Timber.i("circle-translateTransitionOptions");
+ assertNotNull(layer);
+
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setCircleTranslateTransition(options);
+ assertEquals(layer.getCircleTranslateTransition(), options);
+ }
+
+ @Test
public void testCircleTranslateAsConstant() {
checkViewIsDisplayed(R.id.mapView);
Timber.i("circle-translate");
@@ -675,6 +737,7 @@ public class CircleLayerTest extends BaseStyleTest {
assertEquals(1, ((ExponentialStops) layer.getCircleTranslate().getFunction().getStops()).size());
}
+
@Test
public void testCircleTranslateAnchorAsConstant() {
checkViewIsDisplayed(R.id.mapView);
@@ -711,6 +774,7 @@ public class CircleLayerTest extends BaseStyleTest {
assertEquals(1, ((IntervalStops) layer.getCircleTranslateAnchor().getFunction().getStops()).size());
}
+
@Test
public void testCirclePitchScaleAsConstant() {
checkViewIsDisplayed(R.id.mapView);
@@ -748,6 +812,18 @@ public class CircleLayerTest extends BaseStyleTest {
}
@Test
+ public void testCircleStrokeWidthTransition() {
+ checkViewIsDisplayed(R.id.mapView);
+ Timber.i("circle-stroke-widthTransitionOptions");
+ assertNotNull(layer);
+
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setCircleStrokeWidthTransition(options);
+ assertEquals(layer.getCircleStrokeWidthTransition(), options);
+ }
+
+ @Test
public void testCircleStrokeWidthAsConstant() {
checkViewIsDisplayed(R.id.mapView);
Timber.i("circle-stroke-width");
@@ -893,6 +969,18 @@ public class CircleLayerTest extends BaseStyleTest {
}
@Test
+ public void testCircleStrokeColorTransition() {
+ checkViewIsDisplayed(R.id.mapView);
+ Timber.i("circle-stroke-colorTransitionOptions");
+ assertNotNull(layer);
+
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setCircleStrokeColorTransition(options);
+ assertEquals(layer.getCircleStrokeColorTransition(), options);
+ }
+
+ @Test
public void testCircleStrokeColorAsConstant() {
checkViewIsDisplayed(R.id.mapView);
Timber.i("circle-stroke-color");
@@ -1015,6 +1103,18 @@ public class CircleLayerTest extends BaseStyleTest {
}
@Test
+ public void testCircleStrokeOpacityTransition() {
+ checkViewIsDisplayed(R.id.mapView);
+ Timber.i("circle-stroke-opacityTransitionOptions");
+ assertNotNull(layer);
+
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setCircleStrokeOpacityTransition(options);
+ assertEquals(layer.getCircleStrokeOpacityTransition(), options);
+ }
+
+ @Test
public void testCircleStrokeOpacityAsConstant() {
checkViewIsDisplayed(R.id.mapView);
Timber.i("circle-stroke-opacity");
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/FillLayerTest.java b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/FillLayerTest.java
index a1d362f0f9..63dac76edd 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/FillLayerTest.java
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/FillLayerTest.java
@@ -36,6 +36,8 @@ import static org.junit.Assert.*;
import static com.mapbox.mapboxsdk.style.layers.Property.*;
import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.*;
+import com.mapbox.mapboxsdk.style.layers.TransitionOptions;
+
/**
* Basic smoke tests for FillLayer
*/
@@ -81,6 +83,7 @@ public class FillLayerTest extends BaseStyleTest {
assertEquals(layer.getVisibility().getValue(), NONE);
}
+
@Test
public void testFillAntialiasAsConstant() {
checkViewIsDisplayed(R.id.mapView);
@@ -118,6 +121,18 @@ public class FillLayerTest extends BaseStyleTest {
}
@Test
+ public void testFillOpacityTransition() {
+ checkViewIsDisplayed(R.id.mapView);
+ Timber.i("fill-opacityTransitionOptions");
+ assertNotNull(layer);
+
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setFillOpacityTransition(options);
+ assertEquals(layer.getFillOpacityTransition(), options);
+ }
+
+ @Test
public void testFillOpacityAsConstant() {
checkViewIsDisplayed(R.id.mapView);
Timber.i("fill-opacity");
@@ -263,6 +278,18 @@ public class FillLayerTest extends BaseStyleTest {
}
@Test
+ public void testFillColorTransition() {
+ checkViewIsDisplayed(R.id.mapView);
+ Timber.i("fill-colorTransitionOptions");
+ assertNotNull(layer);
+
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setFillColorTransition(options);
+ assertEquals(layer.getFillColorTransition(), options);
+ }
+
+ @Test
public void testFillColorAsConstant() {
checkViewIsDisplayed(R.id.mapView);
Timber.i("fill-color");
@@ -385,6 +412,18 @@ public class FillLayerTest extends BaseStyleTest {
}
@Test
+ public void testFillOutlineColorTransition() {
+ checkViewIsDisplayed(R.id.mapView);
+ Timber.i("fill-outline-colorTransitionOptions");
+ assertNotNull(layer);
+
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setFillOutlineColorTransition(options);
+ assertEquals(layer.getFillOutlineColorTransition(), options);
+ }
+
+ @Test
public void testFillOutlineColorAsConstant() {
checkViewIsDisplayed(R.id.mapView);
Timber.i("fill-outline-color");
@@ -507,6 +546,18 @@ public class FillLayerTest extends BaseStyleTest {
}
@Test
+ public void testFillTranslateTransition() {
+ checkViewIsDisplayed(R.id.mapView);
+ Timber.i("fill-translateTransitionOptions");
+ assertNotNull(layer);
+
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setFillTranslateTransition(options);
+ assertEquals(layer.getFillTranslateTransition(), options);
+ }
+
+ @Test
public void testFillTranslateAsConstant() {
checkViewIsDisplayed(R.id.mapView);
Timber.i("fill-translate");
@@ -543,6 +594,7 @@ public class FillLayerTest extends BaseStyleTest {
assertEquals(1, ((ExponentialStops) layer.getFillTranslate().getFunction().getStops()).size());
}
+
@Test
public void testFillTranslateAnchorAsConstant() {
checkViewIsDisplayed(R.id.mapView);
@@ -580,6 +632,18 @@ public class FillLayerTest extends BaseStyleTest {
}
@Test
+ public void testFillPatternTransition() {
+ checkViewIsDisplayed(R.id.mapView);
+ Timber.i("fill-patternTransitionOptions");
+ assertNotNull(layer);
+
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setFillPatternTransition(options);
+ assertEquals(layer.getFillPatternTransition(), options);
+ }
+
+ @Test
public void testFillPatternAsConstant() {
checkViewIsDisplayed(R.id.mapView);
Timber.i("fill-pattern");
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/LineLayerTest.java b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/LineLayerTest.java
index 466873f9e5..110d23dd90 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/LineLayerTest.java
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/LineLayerTest.java
@@ -36,6 +36,8 @@ import static org.junit.Assert.*;
import static com.mapbox.mapboxsdk.style.layers.Property.*;
import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.*;
+import com.mapbox.mapboxsdk.style.layers.TransitionOptions;
+
/**
* Basic smoke tests for LineLayer
*/
@@ -81,6 +83,7 @@ public class LineLayerTest extends BaseStyleTest {
assertEquals(layer.getVisibility().getValue(), NONE);
}
+
@Test
public void testLineCapAsConstant() {
checkViewIsDisplayed(R.id.mapView);
@@ -117,6 +120,7 @@ public class LineLayerTest extends BaseStyleTest {
assertEquals(1, ((IntervalStops) layer.getLineCap().getFunction().getStops()).size());
}
+
@Test
public void testLineJoinAsConstant() {
checkViewIsDisplayed(R.id.mapView);
@@ -153,6 +157,7 @@ public class LineLayerTest extends BaseStyleTest {
assertEquals(1, ((IntervalStops) layer.getLineJoin().getFunction().getStops()).size());
}
+
@Test
public void testLineMiterLimitAsConstant() {
checkViewIsDisplayed(R.id.mapView);
@@ -190,6 +195,7 @@ public class LineLayerTest extends BaseStyleTest {
assertEquals(1, ((ExponentialStops) layer.getLineMiterLimit().getFunction().getStops()).size());
}
+
@Test
public void testLineRoundLimitAsConstant() {
checkViewIsDisplayed(R.id.mapView);
@@ -228,6 +234,18 @@ public class LineLayerTest extends BaseStyleTest {
}
@Test
+ public void testLineOpacityTransition() {
+ checkViewIsDisplayed(R.id.mapView);
+ Timber.i("line-opacityTransitionOptions");
+ assertNotNull(layer);
+
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setLineOpacityTransition(options);
+ assertEquals(layer.getLineOpacityTransition(), options);
+ }
+
+ @Test
public void testLineOpacityAsConstant() {
checkViewIsDisplayed(R.id.mapView);
Timber.i("line-opacity");
@@ -373,6 +391,18 @@ public class LineLayerTest extends BaseStyleTest {
}
@Test
+ public void testLineColorTransition() {
+ checkViewIsDisplayed(R.id.mapView);
+ Timber.i("line-colorTransitionOptions");
+ assertNotNull(layer);
+
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setLineColorTransition(options);
+ assertEquals(layer.getLineColorTransition(), options);
+ }
+
+ @Test
public void testLineColorAsConstant() {
checkViewIsDisplayed(R.id.mapView);
Timber.i("line-color");
@@ -495,6 +525,18 @@ public class LineLayerTest extends BaseStyleTest {
}
@Test
+ public void testLineTranslateTransition() {
+ checkViewIsDisplayed(R.id.mapView);
+ Timber.i("line-translateTransitionOptions");
+ assertNotNull(layer);
+
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setLineTranslateTransition(options);
+ assertEquals(layer.getLineTranslateTransition(), options);
+ }
+
+ @Test
public void testLineTranslateAsConstant() {
checkViewIsDisplayed(R.id.mapView);
Timber.i("line-translate");
@@ -531,6 +573,7 @@ public class LineLayerTest extends BaseStyleTest {
assertEquals(1, ((ExponentialStops) layer.getLineTranslate().getFunction().getStops()).size());
}
+
@Test
public void testLineTranslateAnchorAsConstant() {
checkViewIsDisplayed(R.id.mapView);
@@ -568,6 +611,18 @@ public class LineLayerTest extends BaseStyleTest {
}
@Test
+ public void testLineWidthTransition() {
+ checkViewIsDisplayed(R.id.mapView);
+ Timber.i("line-widthTransitionOptions");
+ assertNotNull(layer);
+
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setLineWidthTransition(options);
+ assertEquals(layer.getLineWidthTransition(), options);
+ }
+
+ @Test
public void testLineWidthAsConstant() {
checkViewIsDisplayed(R.id.mapView);
Timber.i("line-width");
@@ -605,6 +660,18 @@ public class LineLayerTest extends BaseStyleTest {
}
@Test
+ public void testLineGapWidthTransition() {
+ checkViewIsDisplayed(R.id.mapView);
+ Timber.i("line-gap-widthTransitionOptions");
+ assertNotNull(layer);
+
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setLineGapWidthTransition(options);
+ assertEquals(layer.getLineGapWidthTransition(), options);
+ }
+
+ @Test
public void testLineGapWidthAsConstant() {
checkViewIsDisplayed(R.id.mapView);
Timber.i("line-gap-width");
@@ -750,6 +817,18 @@ public class LineLayerTest extends BaseStyleTest {
}
@Test
+ public void testLineOffsetTransition() {
+ checkViewIsDisplayed(R.id.mapView);
+ Timber.i("line-offsetTransitionOptions");
+ assertNotNull(layer);
+
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setLineOffsetTransition(options);
+ assertEquals(layer.getLineOffsetTransition(), options);
+ }
+
+ @Test
public void testLineOffsetAsConstant() {
checkViewIsDisplayed(R.id.mapView);
Timber.i("line-offset");
@@ -895,6 +974,18 @@ public class LineLayerTest extends BaseStyleTest {
}
@Test
+ public void testLineBlurTransition() {
+ checkViewIsDisplayed(R.id.mapView);
+ Timber.i("line-blurTransitionOptions");
+ assertNotNull(layer);
+
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setLineBlurTransition(options);
+ assertEquals(layer.getLineBlurTransition(), options);
+ }
+
+ @Test
public void testLineBlurAsConstant() {
checkViewIsDisplayed(R.id.mapView);
Timber.i("line-blur");
@@ -1040,6 +1131,18 @@ public class LineLayerTest extends BaseStyleTest {
}
@Test
+ public void testLineDasharrayTransition() {
+ checkViewIsDisplayed(R.id.mapView);
+ Timber.i("line-dasharrayTransitionOptions");
+ assertNotNull(layer);
+
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setLineDasharrayTransition(options);
+ assertEquals(layer.getLineDasharrayTransition(), options);
+ }
+
+ @Test
public void testLineDasharrayAsConstant() {
checkViewIsDisplayed(R.id.mapView);
Timber.i("line-dasharray");
@@ -1076,6 +1179,18 @@ public class LineLayerTest extends BaseStyleTest {
}
@Test
+ public void testLinePatternTransition() {
+ checkViewIsDisplayed(R.id.mapView);
+ Timber.i("line-patternTransitionOptions");
+ assertNotNull(layer);
+
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setLinePatternTransition(options);
+ assertEquals(layer.getLinePatternTransition(), options);
+ }
+
+ @Test
public void testLinePatternAsConstant() {
checkViewIsDisplayed(R.id.mapView);
Timber.i("line-pattern");
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/RasterLayerTest.java b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/RasterLayerTest.java
index eb2155f545..2d902a7432 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/RasterLayerTest.java
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/RasterLayerTest.java
@@ -36,6 +36,8 @@ import static org.junit.Assert.*;
import static com.mapbox.mapboxsdk.style.layers.Property.*;
import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.*;
+import com.mapbox.mapboxsdk.style.layers.TransitionOptions;
+
/**
* Basic smoke tests for RasterLayer
*/
@@ -82,6 +84,18 @@ public class RasterLayerTest extends BaseStyleTest {
}
@Test
+ public void testRasterOpacityTransition() {
+ checkViewIsDisplayed(R.id.mapView);
+ Timber.i("raster-opacityTransitionOptions");
+ assertNotNull(layer);
+
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setRasterOpacityTransition(options);
+ assertEquals(layer.getRasterOpacityTransition(), options);
+ }
+
+ @Test
public void testRasterOpacityAsConstant() {
checkViewIsDisplayed(R.id.mapView);
Timber.i("raster-opacity");
@@ -119,6 +133,18 @@ public class RasterLayerTest extends BaseStyleTest {
}
@Test
+ public void testRasterHueRotateTransition() {
+ checkViewIsDisplayed(R.id.mapView);
+ Timber.i("raster-hue-rotateTransitionOptions");
+ assertNotNull(layer);
+
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setRasterHueRotateTransition(options);
+ assertEquals(layer.getRasterHueRotateTransition(), options);
+ }
+
+ @Test
public void testRasterHueRotateAsConstant() {
checkViewIsDisplayed(R.id.mapView);
Timber.i("raster-hue-rotate");
@@ -156,6 +182,18 @@ public class RasterLayerTest extends BaseStyleTest {
}
@Test
+ public void testRasterBrightnessMinTransition() {
+ checkViewIsDisplayed(R.id.mapView);
+ Timber.i("raster-brightness-minTransitionOptions");
+ assertNotNull(layer);
+
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setRasterBrightnessMinTransition(options);
+ assertEquals(layer.getRasterBrightnessMinTransition(), options);
+ }
+
+ @Test
public void testRasterBrightnessMinAsConstant() {
checkViewIsDisplayed(R.id.mapView);
Timber.i("raster-brightness-min");
@@ -193,6 +231,18 @@ public class RasterLayerTest extends BaseStyleTest {
}
@Test
+ public void testRasterBrightnessMaxTransition() {
+ checkViewIsDisplayed(R.id.mapView);
+ Timber.i("raster-brightness-maxTransitionOptions");
+ assertNotNull(layer);
+
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setRasterBrightnessMaxTransition(options);
+ assertEquals(layer.getRasterBrightnessMaxTransition(), options);
+ }
+
+ @Test
public void testRasterBrightnessMaxAsConstant() {
checkViewIsDisplayed(R.id.mapView);
Timber.i("raster-brightness-max");
@@ -230,6 +280,18 @@ public class RasterLayerTest extends BaseStyleTest {
}
@Test
+ public void testRasterSaturationTransition() {
+ checkViewIsDisplayed(R.id.mapView);
+ Timber.i("raster-saturationTransitionOptions");
+ assertNotNull(layer);
+
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setRasterSaturationTransition(options);
+ assertEquals(layer.getRasterSaturationTransition(), options);
+ }
+
+ @Test
public void testRasterSaturationAsConstant() {
checkViewIsDisplayed(R.id.mapView);
Timber.i("raster-saturation");
@@ -267,6 +329,18 @@ public class RasterLayerTest extends BaseStyleTest {
}
@Test
+ public void testRasterContrastTransition() {
+ checkViewIsDisplayed(R.id.mapView);
+ Timber.i("raster-contrastTransitionOptions");
+ assertNotNull(layer);
+
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setRasterContrastTransition(options);
+ assertEquals(layer.getRasterContrastTransition(), options);
+ }
+
+ @Test
public void testRasterContrastAsConstant() {
checkViewIsDisplayed(R.id.mapView);
Timber.i("raster-contrast");
@@ -304,6 +378,18 @@ public class RasterLayerTest extends BaseStyleTest {
}
@Test
+ public void testRasterFadeDurationTransition() {
+ checkViewIsDisplayed(R.id.mapView);
+ Timber.i("raster-fade-durationTransitionOptions");
+ assertNotNull(layer);
+
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setRasterFadeDurationTransition(options);
+ assertEquals(layer.getRasterFadeDurationTransition(), options);
+ }
+
+ @Test
public void testRasterFadeDurationAsConstant() {
checkViewIsDisplayed(R.id.mapView);
Timber.i("raster-fade-duration");
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 cac950dfc4..5472d32dc6 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
@@ -36,6 +36,8 @@ import static org.junit.Assert.*;
import static com.mapbox.mapboxsdk.style.layers.Property.*;
import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.*;
+import com.mapbox.mapboxsdk.style.layers.TransitionOptions;
+
/**
* Basic smoke tests for SymbolLayer
*/
@@ -81,6 +83,7 @@ public class SymbolLayerTest extends BaseStyleTest {
assertEquals(layer.getVisibility().getValue(), NONE);
}
+
@Test
public void testSymbolPlacementAsConstant() {
checkViewIsDisplayed(R.id.mapView);
@@ -117,6 +120,7 @@ public class SymbolLayerTest extends BaseStyleTest {
assertEquals(1, ((IntervalStops) layer.getSymbolPlacement().getFunction().getStops()).size());
}
+
@Test
public void testSymbolSpacingAsConstant() {
checkViewIsDisplayed(R.id.mapView);
@@ -154,6 +158,7 @@ public class SymbolLayerTest extends BaseStyleTest {
assertEquals(1, ((ExponentialStops) layer.getSymbolSpacing().getFunction().getStops()).size());
}
+
@Test
public void testSymbolAvoidEdgesAsConstant() {
checkViewIsDisplayed(R.id.mapView);
@@ -190,6 +195,7 @@ public class SymbolLayerTest extends BaseStyleTest {
assertEquals(1, ((IntervalStops) layer.getSymbolAvoidEdges().getFunction().getStops()).size());
}
+
@Test
public void testIconAllowOverlapAsConstant() {
checkViewIsDisplayed(R.id.mapView);
@@ -226,6 +232,7 @@ public class SymbolLayerTest extends BaseStyleTest {
assertEquals(1, ((IntervalStops) layer.getIconAllowOverlap().getFunction().getStops()).size());
}
+
@Test
public void testIconIgnorePlacementAsConstant() {
checkViewIsDisplayed(R.id.mapView);
@@ -262,6 +269,7 @@ public class SymbolLayerTest extends BaseStyleTest {
assertEquals(1, ((IntervalStops) layer.getIconIgnorePlacement().getFunction().getStops()).size());
}
+
@Test
public void testIconOptionalAsConstant() {
checkViewIsDisplayed(R.id.mapView);
@@ -298,6 +306,7 @@ public class SymbolLayerTest extends BaseStyleTest {
assertEquals(1, ((IntervalStops) layer.getIconOptional().getFunction().getStops()).size());
}
+
@Test
public void testIconRotationAlignmentAsConstant() {
checkViewIsDisplayed(R.id.mapView);
@@ -334,6 +343,7 @@ public class SymbolLayerTest extends BaseStyleTest {
assertEquals(1, ((IntervalStops) layer.getIconRotationAlignment().getFunction().getStops()).size());
}
+
@Test
public void testIconSizeAsConstant() {
checkViewIsDisplayed(R.id.mapView);
@@ -371,6 +381,7 @@ public class SymbolLayerTest extends BaseStyleTest {
assertEquals(1, ((ExponentialStops) layer.getIconSize().getFunction().getStops()).size());
}
+
@Test
public void testIconTextFitAsConstant() {
checkViewIsDisplayed(R.id.mapView);
@@ -407,6 +418,7 @@ public class SymbolLayerTest extends BaseStyleTest {
assertEquals(1, ((IntervalStops) layer.getIconTextFit().getFunction().getStops()).size());
}
+
@Test
public void testIconTextFitPaddingAsConstant() {
checkViewIsDisplayed(R.id.mapView);
@@ -444,6 +456,7 @@ public class SymbolLayerTest extends BaseStyleTest {
assertEquals(1, ((ExponentialStops) layer.getIconTextFitPadding().getFunction().getStops()).size());
}
+
@Test
public void testIconImageAsConstant() {
checkViewIsDisplayed(R.id.mapView);
@@ -480,6 +493,7 @@ public class SymbolLayerTest extends BaseStyleTest {
assertEquals(1, ((IntervalStops) layer.getIconImage().getFunction().getStops()).size());
}
+
@Test
public void testIconRotateAsConstant() {
checkViewIsDisplayed(R.id.mapView);
@@ -625,6 +639,7 @@ public class SymbolLayerTest extends BaseStyleTest {
assertEquals(0.9f, stop.out, 0.001f);
}
+
@Test
public void testIconPaddingAsConstant() {
checkViewIsDisplayed(R.id.mapView);
@@ -662,6 +677,7 @@ public class SymbolLayerTest extends BaseStyleTest {
assertEquals(1, ((ExponentialStops) layer.getIconPadding().getFunction().getStops()).size());
}
+
@Test
public void testIconKeepUprightAsConstant() {
checkViewIsDisplayed(R.id.mapView);
@@ -698,6 +714,7 @@ public class SymbolLayerTest extends BaseStyleTest {
assertEquals(1, ((IntervalStops) layer.getIconKeepUpright().getFunction().getStops()).size());
}
+
@Test
public void testIconOffsetAsConstant() {
checkViewIsDisplayed(R.id.mapView);
@@ -780,6 +797,7 @@ public class SymbolLayerTest extends BaseStyleTest {
assertEquals(IntervalStops.class, layer.getIconOffset().getFunction().getStops().getClass());
}
+
@Test
public void testTextPitchAlignmentAsConstant() {
checkViewIsDisplayed(R.id.mapView);
@@ -816,6 +834,7 @@ public class SymbolLayerTest extends BaseStyleTest {
assertEquals(1, ((IntervalStops) layer.getTextPitchAlignment().getFunction().getStops()).size());
}
+
@Test
public void testTextRotationAlignmentAsConstant() {
checkViewIsDisplayed(R.id.mapView);
@@ -852,6 +871,7 @@ public class SymbolLayerTest extends BaseStyleTest {
assertEquals(1, ((IntervalStops) layer.getTextRotationAlignment().getFunction().getStops()).size());
}
+
@Test
public void testTextFieldAsConstant() {
checkViewIsDisplayed(R.id.mapView);
@@ -933,6 +953,7 @@ public class SymbolLayerTest extends BaseStyleTest {
assertEquals(IntervalStops.class, layer.getTextField().getFunction().getStops().getClass());
}
+
@Test
public void testTextFontAsConstant() {
checkViewIsDisplayed(R.id.mapView);
@@ -969,6 +990,7 @@ public class SymbolLayerTest extends BaseStyleTest {
assertEquals(1, ((IntervalStops) layer.getTextFont().getFunction().getStops()).size());
}
+
@Test
public void testTextSizeAsConstant() {
checkViewIsDisplayed(R.id.mapView);
@@ -1006,6 +1028,7 @@ public class SymbolLayerTest extends BaseStyleTest {
assertEquals(1, ((ExponentialStops) layer.getTextSize().getFunction().getStops()).size());
}
+
@Test
public void testTextMaxWidthAsConstant() {
checkViewIsDisplayed(R.id.mapView);
@@ -1043,6 +1066,7 @@ public class SymbolLayerTest extends BaseStyleTest {
assertEquals(1, ((ExponentialStops) layer.getTextMaxWidth().getFunction().getStops()).size());
}
+
@Test
public void testTextLineHeightAsConstant() {
checkViewIsDisplayed(R.id.mapView);
@@ -1080,6 +1104,7 @@ public class SymbolLayerTest extends BaseStyleTest {
assertEquals(1, ((ExponentialStops) layer.getTextLineHeight().getFunction().getStops()).size());
}
+
@Test
public void testTextLetterSpacingAsConstant() {
checkViewIsDisplayed(R.id.mapView);
@@ -1117,6 +1142,7 @@ public class SymbolLayerTest extends BaseStyleTest {
assertEquals(1, ((ExponentialStops) layer.getTextLetterSpacing().getFunction().getStops()).size());
}
+
@Test
public void testTextJustifyAsConstant() {
checkViewIsDisplayed(R.id.mapView);
@@ -1153,6 +1179,7 @@ public class SymbolLayerTest extends BaseStyleTest {
assertEquals(1, ((IntervalStops) layer.getTextJustify().getFunction().getStops()).size());
}
+
@Test
public void testTextAnchorAsConstant() {
checkViewIsDisplayed(R.id.mapView);
@@ -1189,6 +1216,7 @@ public class SymbolLayerTest extends BaseStyleTest {
assertEquals(1, ((IntervalStops) layer.getTextAnchor().getFunction().getStops()).size());
}
+
@Test
public void testTextMaxAngleAsConstant() {
checkViewIsDisplayed(R.id.mapView);
@@ -1226,6 +1254,7 @@ public class SymbolLayerTest extends BaseStyleTest {
assertEquals(1, ((ExponentialStops) layer.getTextMaxAngle().getFunction().getStops()).size());
}
+
@Test
public void testTextRotateAsConstant() {
checkViewIsDisplayed(R.id.mapView);
@@ -1263,6 +1292,7 @@ public class SymbolLayerTest extends BaseStyleTest {
assertEquals(1, ((ExponentialStops) layer.getTextRotate().getFunction().getStops()).size());
}
+
@Test
public void testTextPaddingAsConstant() {
checkViewIsDisplayed(R.id.mapView);
@@ -1300,6 +1330,7 @@ public class SymbolLayerTest extends BaseStyleTest {
assertEquals(1, ((ExponentialStops) layer.getTextPadding().getFunction().getStops()).size());
}
+
@Test
public void testTextKeepUprightAsConstant() {
checkViewIsDisplayed(R.id.mapView);
@@ -1336,6 +1367,7 @@ public class SymbolLayerTest extends BaseStyleTest {
assertEquals(1, ((IntervalStops) layer.getTextKeepUpright().getFunction().getStops()).size());
}
+
@Test
public void testTextTransformAsConstant() {
checkViewIsDisplayed(R.id.mapView);
@@ -1417,6 +1449,7 @@ public class SymbolLayerTest extends BaseStyleTest {
assertEquals(IntervalStops.class, layer.getTextTransform().getFunction().getStops().getClass());
}
+
@Test
public void testTextOffsetAsConstant() {
checkViewIsDisplayed(R.id.mapView);
@@ -1499,6 +1532,7 @@ public class SymbolLayerTest extends BaseStyleTest {
assertEquals(IntervalStops.class, layer.getTextOffset().getFunction().getStops().getClass());
}
+
@Test
public void testTextAllowOverlapAsConstant() {
checkViewIsDisplayed(R.id.mapView);
@@ -1535,6 +1569,7 @@ public class SymbolLayerTest extends BaseStyleTest {
assertEquals(1, ((IntervalStops) layer.getTextAllowOverlap().getFunction().getStops()).size());
}
+
@Test
public void testTextIgnorePlacementAsConstant() {
checkViewIsDisplayed(R.id.mapView);
@@ -1571,6 +1606,7 @@ public class SymbolLayerTest extends BaseStyleTest {
assertEquals(1, ((IntervalStops) layer.getTextIgnorePlacement().getFunction().getStops()).size());
}
+
@Test
public void testTextOptionalAsConstant() {
checkViewIsDisplayed(R.id.mapView);
@@ -1608,6 +1644,18 @@ public class SymbolLayerTest extends BaseStyleTest {
}
@Test
+ public void testIconOpacityTransition() {
+ checkViewIsDisplayed(R.id.mapView);
+ Timber.i("icon-opacityTransitionOptions");
+ assertNotNull(layer);
+
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setIconOpacityTransition(options);
+ assertEquals(layer.getIconOpacityTransition(), options);
+ }
+
+ @Test
public void testIconOpacityAsConstant() {
checkViewIsDisplayed(R.id.mapView);
Timber.i("icon-opacity");
@@ -1753,6 +1801,18 @@ public class SymbolLayerTest extends BaseStyleTest {
}
@Test
+ public void testIconColorTransition() {
+ checkViewIsDisplayed(R.id.mapView);
+ Timber.i("icon-colorTransitionOptions");
+ assertNotNull(layer);
+
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setIconColorTransition(options);
+ assertEquals(layer.getIconColorTransition(), options);
+ }
+
+ @Test
public void testIconColorAsConstant() {
checkViewIsDisplayed(R.id.mapView);
Timber.i("icon-color");
@@ -1875,6 +1935,18 @@ public class SymbolLayerTest extends BaseStyleTest {
}
@Test
+ public void testIconHaloColorTransition() {
+ checkViewIsDisplayed(R.id.mapView);
+ Timber.i("icon-halo-colorTransitionOptions");
+ assertNotNull(layer);
+
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setIconHaloColorTransition(options);
+ assertEquals(layer.getIconHaloColorTransition(), options);
+ }
+
+ @Test
public void testIconHaloColorAsConstant() {
checkViewIsDisplayed(R.id.mapView);
Timber.i("icon-halo-color");
@@ -1997,6 +2069,18 @@ public class SymbolLayerTest extends BaseStyleTest {
}
@Test
+ public void testIconHaloWidthTransition() {
+ checkViewIsDisplayed(R.id.mapView);
+ Timber.i("icon-halo-widthTransitionOptions");
+ assertNotNull(layer);
+
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setIconHaloWidthTransition(options);
+ assertEquals(layer.getIconHaloWidthTransition(), options);
+ }
+
+ @Test
public void testIconHaloWidthAsConstant() {
checkViewIsDisplayed(R.id.mapView);
Timber.i("icon-halo-width");
@@ -2142,6 +2226,18 @@ public class SymbolLayerTest extends BaseStyleTest {
}
@Test
+ public void testIconHaloBlurTransition() {
+ checkViewIsDisplayed(R.id.mapView);
+ Timber.i("icon-halo-blurTransitionOptions");
+ assertNotNull(layer);
+
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setIconHaloBlurTransition(options);
+ assertEquals(layer.getIconHaloBlurTransition(), options);
+ }
+
+ @Test
public void testIconHaloBlurAsConstant() {
checkViewIsDisplayed(R.id.mapView);
Timber.i("icon-halo-blur");
@@ -2287,6 +2383,18 @@ public class SymbolLayerTest extends BaseStyleTest {
}
@Test
+ public void testIconTranslateTransition() {
+ checkViewIsDisplayed(R.id.mapView);
+ Timber.i("icon-translateTransitionOptions");
+ assertNotNull(layer);
+
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setIconTranslateTransition(options);
+ assertEquals(layer.getIconTranslateTransition(), options);
+ }
+
+ @Test
public void testIconTranslateAsConstant() {
checkViewIsDisplayed(R.id.mapView);
Timber.i("icon-translate");
@@ -2323,6 +2431,7 @@ public class SymbolLayerTest extends BaseStyleTest {
assertEquals(1, ((ExponentialStops) layer.getIconTranslate().getFunction().getStops()).size());
}
+
@Test
public void testIconTranslateAnchorAsConstant() {
checkViewIsDisplayed(R.id.mapView);
@@ -2360,6 +2469,18 @@ public class SymbolLayerTest extends BaseStyleTest {
}
@Test
+ public void testTextOpacityTransition() {
+ checkViewIsDisplayed(R.id.mapView);
+ Timber.i("text-opacityTransitionOptions");
+ assertNotNull(layer);
+
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setTextOpacityTransition(options);
+ assertEquals(layer.getTextOpacityTransition(), options);
+ }
+
+ @Test
public void testTextOpacityAsConstant() {
checkViewIsDisplayed(R.id.mapView);
Timber.i("text-opacity");
@@ -2505,6 +2626,18 @@ public class SymbolLayerTest extends BaseStyleTest {
}
@Test
+ public void testTextColorTransition() {
+ checkViewIsDisplayed(R.id.mapView);
+ Timber.i("text-colorTransitionOptions");
+ assertNotNull(layer);
+
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setTextColorTransition(options);
+ assertEquals(layer.getTextColorTransition(), options);
+ }
+
+ @Test
public void testTextColorAsConstant() {
checkViewIsDisplayed(R.id.mapView);
Timber.i("text-color");
@@ -2627,6 +2760,18 @@ public class SymbolLayerTest extends BaseStyleTest {
}
@Test
+ public void testTextHaloColorTransition() {
+ checkViewIsDisplayed(R.id.mapView);
+ Timber.i("text-halo-colorTransitionOptions");
+ assertNotNull(layer);
+
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setTextHaloColorTransition(options);
+ assertEquals(layer.getTextHaloColorTransition(), options);
+ }
+
+ @Test
public void testTextHaloColorAsConstant() {
checkViewIsDisplayed(R.id.mapView);
Timber.i("text-halo-color");
@@ -2749,6 +2894,18 @@ public class SymbolLayerTest extends BaseStyleTest {
}
@Test
+ public void testTextHaloWidthTransition() {
+ checkViewIsDisplayed(R.id.mapView);
+ Timber.i("text-halo-widthTransitionOptions");
+ assertNotNull(layer);
+
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setTextHaloWidthTransition(options);
+ assertEquals(layer.getTextHaloWidthTransition(), options);
+ }
+
+ @Test
public void testTextHaloWidthAsConstant() {
checkViewIsDisplayed(R.id.mapView);
Timber.i("text-halo-width");
@@ -2894,6 +3051,18 @@ public class SymbolLayerTest extends BaseStyleTest {
}
@Test
+ public void testTextHaloBlurTransition() {
+ checkViewIsDisplayed(R.id.mapView);
+ Timber.i("text-halo-blurTransitionOptions");
+ assertNotNull(layer);
+
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setTextHaloBlurTransition(options);
+ assertEquals(layer.getTextHaloBlurTransition(), options);
+ }
+
+ @Test
public void testTextHaloBlurAsConstant() {
checkViewIsDisplayed(R.id.mapView);
Timber.i("text-halo-blur");
@@ -3039,6 +3208,18 @@ public class SymbolLayerTest extends BaseStyleTest {
}
@Test
+ public void testTextTranslateTransition() {
+ checkViewIsDisplayed(R.id.mapView);
+ Timber.i("text-translateTransitionOptions");
+ assertNotNull(layer);
+
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.setTextTranslateTransition(options);
+ assertEquals(layer.getTextTranslateTransition(), options);
+ }
+
+ @Test
public void testTextTranslateAsConstant() {
checkViewIsDisplayed(R.id.mapView);
Timber.i("text-translate");
@@ -3075,6 +3256,7 @@ public class SymbolLayerTest extends BaseStyleTest {
assertEquals(1, ((ExponentialStops) layer.getTextTranslate().getFunction().getStops()).size());
}
+
@Test
public void testTextTranslateAnchorAsConstant() {
checkViewIsDisplayed(R.id.mapView);
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/layer.junit.ejs b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/layer.junit.ejs
index 3dc88d29bb..8aa0f15954 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/layer.junit.ejs
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/layer.junit.ejs
@@ -40,6 +40,8 @@ import static org.junit.Assert.*;
import static com.mapbox.mapboxsdk.style.layers.Property.*;
import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.*;
+import com.mapbox.mapboxsdk.style.layers.TransitionOptions;
+
/**
* Basic smoke tests for <%- camelize(type) %>Layer
*/
@@ -91,6 +93,20 @@ public class <%- camelize(type) %>LayerTest extends BaseStyleTest {
}
<% for (const property of properties) { -%>
+<% if (property.transition) { -%>
+ @Test
+ public void test<%- camelize(property.name) %>Transition() {
+ checkViewIsDisplayed(R.id.mapView);
+ Timber.i("<%- property.name %>TransitionOptions");
+ assertNotNull(layer);
+
+ // Set and Get
+ TransitionOptions options = new TransitionOptions(300, 100);
+ layer.set<%- camelize(property.name) %>Transition(options);
+ assertEquals(layer.get<%- camelize(property.name) %>Transition(), options);
+ }
+<% } -%>
+
@Test
public void test<%- camelize(property.name) %>AsConstant() {
checkViewIsDisplayed(R.id.mapView);
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 2fc0407c7f..f63ede9bce 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
@@ -23,6 +23,7 @@ import com.mapbox.mapboxsdk.style.layers.LineLayer;
import com.mapbox.mapboxsdk.style.layers.Property;
import com.mapbox.mapboxsdk.style.layers.PropertyValue;
import com.mapbox.mapboxsdk.style.layers.RasterLayer;
+import com.mapbox.mapboxsdk.style.layers.TransitionOptions;
import com.mapbox.mapboxsdk.style.sources.GeoJsonSource;
import com.mapbox.mapboxsdk.style.sources.RasterSource;
import com.mapbox.mapboxsdk.style.sources.Source;
@@ -95,6 +96,9 @@ public class RuntimeStyleActivity extends AppCompatActivity {
// Center and Zoom (Amsterdam, zoomed to streets)
mapboxMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(52.379189, 4.899431), 14));
+
+ mapboxMap.setTransitionDuration(250);
+ mapboxMap.setTransitionDelay(50);
}
});
}
@@ -257,10 +261,9 @@ public class RuntimeStyleActivity extends AppCompatActivity {
}
private void setWaterColor() {
- Layer water = mapboxMap.getLayer("water");
+ FillLayer water = mapboxMap.getLayerAs("water");
if (water != null) {
- mapboxMap.setTransitionDuration(5000);
- mapboxMap.setTransitionDelay(1000);
+ water.setFillColorTransition(new TransitionOptions(7500, 1000));
water.setProperties(
visibility(VISIBLE),
fillColor(Color.RED)
@@ -510,7 +513,8 @@ public class RuntimeStyleActivity extends AppCompatActivity {
if (states != null) {
states.setFilter(eq("name", "Texas"));
-
+ states.setFillOpacityTransition(new TransitionOptions(2500, 0));
+ states.setFillColorTransition(new TransitionOptions(2500, 0));
states.setProperties(
fillColor(Color.RED),
fillOpacity(0.25f)