Rendering statistics view (#3322)

Co-authored-by: Bart Louwers <bart@emeel.net>
This commit is contained in:
Adrian Cojocaru
2025-06-03 18:59:51 +03:00
committed by GitHub
parent 3c07cacc4d
commit 2a7249a3b0
81 changed files with 1271 additions and 128 deletions

View File

@@ -60,7 +60,7 @@ class RemoveUnusedImagesTest : AppCenter() {
mapView.addOnCanRemoveUnusedStyleImageListener {
callbackLatch.countDown()
maplibreMap.moveCamera(CameraUpdateFactory.newLatLngZoom(LatLng(0.0, 120.0), 8.0))
mapView.addOnDidFinishRenderingFrameListener{ _, _, _ ->
mapView.addOnDidFinishRenderingFrameListener{ _, _ ->
assertNotNull(maplibreMap.style!!.getImage("small"))
assertNotNull(maplibreMap.style!!.getImage("large"))
latch.countDown()
@@ -89,7 +89,7 @@ class RemoveUnusedImagesTest : AppCenter() {
maplibreMap.moveCamera(CameraUpdateFactory.newLatLngZoom(LatLng(0.0, 120.0), 8.0))
// Wait for the next frame and check that images were removed from the style.
mapView.addOnDidFinishRenderingFrameListener { _, _, _ ->
mapView.addOnDidFinishRenderingFrameListener { _, _ ->
if (maplibreMap.style!!.getImage("small") == null && maplibreMap.style!!.getImage("large") == null) {
latch.countDown()
}

View File

@@ -917,6 +917,19 @@ public class SymbolLayerTest extends BaseLayerTest {
assertEquals(layer.getTextOptional().getValue(), propertyValue);
}
@Test
@UiThreadTest
public void testSymbolScreenSpaceAsConstant() {
Timber.i("symbol-screen-space");
assertNotNull(layer);
assertNull(layer.getSymbolScreenSpace().getValue());
// Set and Get
Boolean propertyValue = true;
layer.setProperties(symbolScreenSpace(propertyValue));
assertEquals(layer.getSymbolScreenSpace().getValue(), propertyValue);
}
@Test
@UiThreadTest
public void testIconOpacityTransition() {