diff options
Diffstat (limited to 'platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/InfoWindow.java')
-rw-r--r-- | platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/InfoWindow.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/InfoWindow.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/InfoWindow.java index 57e9373a42..cf42bfe738 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/InfoWindow.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/InfoWindow.java @@ -133,7 +133,7 @@ public class InfoWindow { float x = coordinates.x - (view.getMeasuredWidth() / 2) + offsetX; float y = coordinates.y - view.getMeasuredHeight() + offsetY; - if (view instanceof InfoWindowView) { + if (view instanceof BubbleLayout) { // only apply repositioning/margin for InfoWindowView Resources resources = mapView.getContext().getResources(); @@ -187,8 +187,7 @@ public class InfoWindow { } // Adjust tipView - InfoWindowView infoWindowView = (InfoWindowView) view; - infoWindowView.setTipViewMarginLeft((int) tipViewMarginLeft); + ((BubbleLayout) view).setArrowPosition(tipViewMarginLeft); } // set anchor popupwindowview @@ -284,7 +283,7 @@ public class InfoWindow { if (mapboxMap != null && marker != null && view != null) { coordinates = mapboxMap.getProjection().toScreenLocation(marker.getPosition()); - if (view instanceof InfoWindowView) { + if (view instanceof BubbleLayout) { view.setX(coordinates.x + viewWidthOffset - markerWidthOffset); } else { view.setX(coordinates.x - (view.getMeasuredWidth() / 2) - markerWidthOffset); |