summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobrun <tobrun.van.nuland@gmail.com>2018-12-04 18:27:28 +0200
committerTobrun <tobrun@mapbox.com>2018-12-10 16:59:50 +0100
commit075443e18b868c559b79aaa861af05cb02ee323a (patch)
tree2b3535ed3f9e8d890b9ffbbea20cbfe875c78f7f
parent2efdf938a810373815b37198100d6d3a2c673095 (diff)
downloadqtlocation-mapboxgl-075443e18b868c559b79aaa861af05cb02ee323a.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) {