summaryrefslogtreecommitdiff
path: root/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java
diff options
context:
space:
mode:
authorTobrun <tobrun.van.nuland@gmail.com>2018-12-07 17:00:36 +0200
committerTobrun <tobrun@mapbox.com>2018-12-10 16:59:50 +0100
commit8eaff9ce13b1a16bf347d27fde2d9ebfdd8665a4 (patch)
treee0086b3cb4792720e879feb380e5f0850e6f405f /platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java
parent648f34aadc97df07026b89256afe8ae813baee81 (diff)
downloadqtlocation-mapboxgl-8eaff9ce13b1a16bf347d27fde2d9ebfdd8665a4.tar.gz
[android] - make style part of location component activation, add tests for non existing style and multiple style loading, revisit code comments
Diffstat (limited to 'platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java')
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java
index 558ea56a0d..b4c977cf15 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java
@@ -1061,7 +1061,7 @@ public class MapView extends FrameLayout implements NativeMapView.ViewCallback {
private class MapCallback implements OnDidFinishLoadingStyleListener,
OnDidFinishRenderingFrameListener, OnDidFinishLoadingMapListener,
- OnCameraIsChangingListener, OnCameraDidChangeListener {
+ OnCameraIsChangingListener, OnCameraDidChangeListener, OnDidFailLoadingMapListener {
private final List<OnMapReadyCallback> onMapReadyCallbackList = new ArrayList<>();
@@ -1071,6 +1071,7 @@ public class MapView extends FrameLayout implements NativeMapView.ViewCallback {
addOnDidFinishLoadingMapListener(this);
addOnCameraIsChangingListener(this);
addOnCameraDidChangeListener(this);
+ addOnDidFailLoadingMapListener(this);
}
void initialised() {
@@ -1107,6 +1108,7 @@ public class MapView extends FrameLayout implements NativeMapView.ViewCallback {
removeOnDidFinishLoadingMapListener(this);
removeOnCameraIsChangingListener(this);
removeOnCameraDidChangeListener(this);
+ removeOnDidFailLoadingMapListener(this);
}
@Override
@@ -1117,6 +1119,13 @@ public class MapView extends FrameLayout implements NativeMapView.ViewCallback {
}
@Override
+ public void onDidFailLoadingMap(String errorMessage) {
+ if (mapboxMap != null) {
+ mapboxMap.onFailLoadingStyle();
+ }
+ }
+
+ @Override
public void onDidFinishRenderingFrame(boolean fully) {
if (mapboxMap != null) {
mapboxMap.onUpdateFullyRendered();