diff options
Diffstat (limited to 'platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/Style.java')
-rw-r--r-- | platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/Style.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/Style.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/Style.java index db82f4e266..cb60f2dbea 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/Style.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/Style.java @@ -25,7 +25,7 @@ import java.util.List; * has been loaded by underlying map. * </p> */ -public class Style { +public class Style implements NativeMapView.StyleCallback { private final NativeMapView nativeMapView; private final HashMap<String, Source> sources = new HashMap<>(); @@ -365,7 +365,8 @@ public class Style { * Called when the underlying map will start loading a new style. This method will clean up this style * by setting the java sources and layers in a detached state and removing them from core. */ - void onWillStartLoadingStyle() { + @Override + public void onWillStartLoadingMap() { for (Source source : sources.values()) { if (source != null) { source.setDetached(); @@ -388,7 +389,8 @@ public class Style { * Called when the underlying map has finished loading this style. * This method will add all components added to the builder that were defined with the 'with' prefix. */ - void onDidFinishLoadingStyle() { + @Override + public void onDidFinishLoadingStyle() { if (!styleLoaded) { styleLoaded = true; for (Source source : builder.sources) { @@ -597,7 +599,7 @@ public class Style { */ void build(@NonNull NativeMapView nativeMapView, @Nullable OnStyleLoaded styleLoaded) { Style style = new Style(this, nativeMapView, styleLoaded); - nativeMapView.setStyle(style); + nativeMapView.setStyleCallback(style); if (styleUrl != null) { nativeMapView.setStyleUrl(styleUrl); |