Add support for text-variable-anchor-offset property (#2921)

Co-authored-by: Yingfang Wang <junew@microsoft.com>
Co-authored-by: Alexey Kon <48697757+random3940@users.noreply.github.com>
This commit is contained in:
wangyingfang
2024-10-28 19:15:54 +08:00
committed by GitHub
parent 90a798bfee
commit 1a63194078
192 changed files with 5931 additions and 107 deletions

View File

@@ -722,6 +722,19 @@ public class SymbolLayerTest extends BaseLayerTest {
assertEquals(layer.getTextVariableAnchor().getValue(), propertyValue);
}
@Test
@UiThreadTest
public void testTextVariableAnchorOffsetAsConstant() {
Timber.i("text-variable-anchor-offset");
assertNotNull(layer);
assertNull(layer.getTextVariableAnchorOffset().getValue());
// Set and Get
Object[] propertyValue = new Object[] {"top", new Float[]{1f, 2f}};
layer.setProperties(textVariableAnchorOffset(propertyValue));
assertEquals(layer.getTextVariableAnchorOffset().getValue(), propertyValue);
}
@Test
@UiThreadTest
public void testTextAnchorAsConstant() {