summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorTobrun <tobrun.van.nuland@gmail.com>2016-06-26 23:19:51 +0200
committerAntonio Zugaldia <antonio@mapbox.com>2016-06-27 10:18:38 -0400
commit3456e086ac27c6f30978263e43eb82111e883e72 (patch)
tree19d15a15af7f898ba00000a0d9aa2f4d913a6673 /platform
parent0d17bb1cc8c84d6f235a858b7ccda389992b61d4 (diff)
downloadqtlocation-mapboxgl-3456e086ac27c6f30978263e43eb82111e883e72.tar.gz
[android] Fixes disappearing markers when crossing dateline, remove debug exception catch.
Fixes #5402
Diffstat (limited to 'platform')
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java11
1 files changed, 3 insertions, 8 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 8fe9568eaa..3fcb58e31d 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
@@ -1136,13 +1136,13 @@ public class MapView extends FrameLayout {
for (int i = 0; i < ids.length; i++) {
idsList.add(ids[i]);
}
-
+
List<MarkerView> annotations = new ArrayList<>(ids.length);
List<Annotation> annotationList = mMapboxMap.getAnnotations();
int count = annotationList.size();
for (int i = 0; i < count; i++) {
Annotation annotation = annotationList.get(i);
- if (annotation instanceof MarkerView && idsList.contains(annotation.getId())) {
+ if (annotation instanceof MarkerView) {
annotations.add((MarkerView) annotation);
}
}
@@ -1395,15 +1395,10 @@ public class MapView extends FrameLayout {
if (mDestroyed) {
return;
}
-
mCompassView.update(getDirection());
mMyLocationView.update();
+ mMapboxMap.getMarkerViewManager().update();
- try {
- mMapboxMap.getMarkerViewManager().update();
- }catch (NullPointerException e){
-
- }
for (InfoWindow infoWindow : mMapboxMap.getInfoWindows()) {
infoWindow.update();
}