summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobrun <tobrun.van.nuland@gmail.com>2018-12-04 18:27:28 +0200
committertobrun <tobrun.van.nuland@gmail.com>2018-12-10 11:49:35 +0100
commit6f1baf2a77682192626b0763120485af06d26251 (patch)
tree2b3535ed3f9e8d890b9ffbbea20cbfe875c78f7f
parentc53cfca80dc34e22887647bbfe5c40bb57b78405 (diff)
downloadqtlocation-mapboxgl-6f1baf2a77682192626b0763120485af06d26251.tar.gz
[android] - limit visibility, clear callbacks
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java2
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/Style.java4
2 files changed, 3 insertions, 3 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java
index 6a95338db7..f9560e9edd 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java
@@ -206,7 +206,6 @@ public final class MapboxMap {
*/
void onFinishLoadingStyle() {
locationComponent.onFinishLoadingStyle();
- locationComponent.onStart();
}
/**
@@ -761,6 +760,7 @@ public final class MapboxMap {
for (Style.OnStyleLoaded styleLoadedCallback : styleLoadedCallbacks) {
styleLoadedCallback.onStyleLoaded(style);
}
+ styleLoadedCallbacks.clear();
}
});
}
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 932c7a1bf0..db82f4e266 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
@@ -365,7 +365,7 @@ 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.
*/
- public void onWillStartLoadingStyle() {
+ void onWillStartLoadingStyle() {
for (Source source : sources.values()) {
if (source != null) {
source.setDetached();
@@ -388,7 +388,7 @@ 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.
*/
- public void onDidFinishLoadingStyle() {
+ void onDidFinishLoadingStyle() {
if (!styleLoaded) {
styleLoaded = true;
for (Source source : builder.sources) {