[android] move style callback invocation to MapboxMap
This commit is contained in:
@@ -168,7 +168,6 @@ class LocationComponentTest : BaseActivityTest() {
|
||||
assertThat(mapboxMap.isLayerVisible(FOREGROUND_LAYER), `is`(true))
|
||||
assertThat(mapboxMap.isLayerVisible(BACKGROUND_LAYER), `is`(true))
|
||||
assertThat(mapboxMap.isLayerVisible(SHADOW_LAYER), `is`(true))
|
||||
assertThat(mapboxMap.isLayerVisible(ACCURACY_LAYER), `is`(true))
|
||||
assertThat(mapboxMap.isLayerVisible(BEARING_LAYER), `is`(false))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ fun MapboxMap.waitForLayer(uiController: UiController, location: Location, layer
|
||||
var counter = 0
|
||||
val delay = MapboxTestingUtils.MAP_RENDER_DELAY
|
||||
while (
|
||||
if (shouldDisappear) this.queryRenderedFeatures(location, layerId).isNotEmpty() else this.queryRenderedFeatures(location, layerId).isEmpty()
|
||||
if (shouldDisappear) this.queryRenderedFeatures(location, layerId).isNotEmpty() else (this.style == null || this.queryRenderedFeatures(location, layerId).isEmpty())
|
||||
&& delay * counter < MapboxTestingUtils.RENDER_TIMEOUT) {
|
||||
uiController.loopMainThreadForAtLeast(delay)
|
||||
counter++
|
||||
|
||||
@@ -504,9 +504,9 @@ public class ExpressionTest extends BaseActivityTest {
|
||||
validateTestSetup();
|
||||
invoke(mapboxMap, (uiController, mapboxMap) -> {
|
||||
LatLng latLng = new LatLng(51, 17);
|
||||
mapboxMap.addSource(new GeoJsonSource("source", Point.fromLngLat(latLng.getLongitude(), latLng.getLatitude())));
|
||||
mapboxMap.getStyle().addSource(new GeoJsonSource("source", Point.fromLngLat(latLng.getLongitude(), latLng.getLatitude())));
|
||||
SymbolLayer layer = new SymbolLayer("layer", "source");
|
||||
mapboxMap.addLayer(layer);
|
||||
mapboxMap.getStyle().addLayer(layer);
|
||||
|
||||
Formatted formatted = new Formatted(
|
||||
new FormattedSection("test", 1.5),
|
||||
|
||||
Reference in New Issue
Block a user