[core] Implement circle-pitch-alignment property

Closes issue #9349.
This commit is contained in:
Chris Loer
2017-07-05 13:59:45 -07:00
committed by Chris Loer
parent 3800edb133
commit d5fbcb242a
18 changed files with 295 additions and 11 deletions

View File

@@ -1047,6 +1047,44 @@ public class CircleLayerTest extends BaseActivityTest {
});
}
@Test
public void testCirclePitchAlignmentAsConstant() {
validateTestSetup();
setupLayer();
Timber.i("circle-pitch-alignment");
assertNotNull(layer);
// Set and Get
layer.setProperties(circlePitchAlignment(CIRCLE_PITCH_ALIGNMENT_MAP));
assertEquals((String) layer.getCirclePitchAlignment().getValue(), (String) CIRCLE_PITCH_ALIGNMENT_MAP);
}
@Test
public void testCirclePitchAlignmentAsCameraFunction() {
validateTestSetup();
setupLayer();
Timber.i("circle-pitch-alignment");
assertNotNull(layer);
// Set
layer.setProperties(
circlePitchAlignment(
zoom(
interval(
stop(2, circlePitchAlignment(CIRCLE_PITCH_ALIGNMENT_MAP))
)
)
)
);
// Verify
assertNotNull(layer.getCirclePitchAlignment());
assertNotNull(layer.getCirclePitchAlignment().getFunction());
assertEquals(CameraFunction.class, layer.getCirclePitchAlignment().getFunction().getClass());
assertEquals(IntervalStops.class, layer.getCirclePitchAlignment().getFunction().getStops().getClass());
assertEquals(1, ((IntervalStops) layer.getCirclePitchAlignment().getFunction().getStops()).size());
}
@Test
public void testCircleStrokeWidthTransition() {
validateTestSetup();