From 476aba6717860d16ffc09d45c29ed3e20db50817 Mon Sep 17 00:00:00 2001 From: Tobrun Date: Tue, 4 Dec 2018 17:32:14 +0200 Subject: [android] - update CircleLayer to be compatible --- .../mapboxsdk/testapp/activity/style/CircleLayerActivity.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/CircleLayerActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/CircleLayerActivity.java index 83a0f9cb08..c79321a1d1 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/CircleLayerActivity.java +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/CircleLayerActivity.java @@ -74,19 +74,15 @@ public class CircleLayerActivity extends AppCompatActivity implements View.OnCli mapView.onCreate(savedInstanceState); mapView.getMapAsync(map -> { mapboxMap = map; - - mapboxMap.setStyle(Style.SATELLITE_STREETS, style -> { + mapboxMap.setStyle(Style.SATELLITE_STREETS); + mapView.addOnDidFinishLoadingStyleListener(() -> { + Style style = mapboxMap.getStyle(); addBusStopSource(style); addBusStopCircleLayer(style); initFloatingActionButtons(); isLoadingStyle = false; }); }); - - mapView.addOnDidFinishLoadingStyleListener(() -> { - addBusStop(); - isLoadingStyle = false; - }); } private void addBusStopSource(Style style) { -- cgit v1.2.1