diff options
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.java | 22 |
1 files changed, 13 insertions, 9 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 238c79392b..81cd1830e6 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 @@ -4,7 +4,6 @@ import android.content.Context; import android.graphics.Bitmap; import android.graphics.PointF; import android.graphics.drawable.ColorDrawable; -import android.opengl.GLSurfaceView; import android.os.Bundle; import android.support.annotation.CallSuper; import android.support.annotation.NonNull; @@ -19,6 +18,7 @@ import android.view.TextureView; import android.view.View; import android.widget.FrameLayout; import android.widget.ImageView; + import com.mapbox.android.gestures.AndroidGesturesManager; import com.mapbox.mapboxsdk.MapStrictMode; import com.mapbox.mapboxsdk.Mapbox; @@ -29,18 +29,20 @@ import com.mapbox.mapboxsdk.exceptions.MapboxConfigurationException; import com.mapbox.mapboxsdk.location.LocationComponent; import com.mapbox.mapboxsdk.maps.renderer.MapRenderer; import com.mapbox.mapboxsdk.maps.renderer.glsurfaceview.GLSurfaceViewMapRenderer; +import com.mapbox.mapboxsdk.maps.renderer.glsurfaceview.MapboxGLSurfaceView; import com.mapbox.mapboxsdk.maps.renderer.textureview.TextureViewMapRenderer; import com.mapbox.mapboxsdk.maps.widgets.CompassView; import com.mapbox.mapboxsdk.net.ConnectivityReceiver; import com.mapbox.mapboxsdk.storage.FileSource; import com.mapbox.mapboxsdk.utils.BitmapUtils; -import javax.microedition.khronos.egl.EGLConfig; -import javax.microedition.khronos.opengles.GL10; import java.util.ArrayList; import java.util.Iterator; import java.util.List; +import javax.microedition.khronos.egl.EGLConfig; +import javax.microedition.khronos.opengles.GL10; + import static com.mapbox.mapboxsdk.maps.widgets.CompassView.TIME_MAP_NORTH_ANIMATION; import static com.mapbox.mapboxsdk.maps.widgets.CompassView.TIME_WAIT_IDLE; @@ -295,7 +297,7 @@ public class MapView extends FrameLayout implements NativeMapView.ViewCallback { addView(textureView, 0); } else { - GLSurfaceView glSurfaceView = new GLSurfaceView(getContext()); + MapboxGLSurfaceView glSurfaceView = new MapboxGLSurfaceView(getContext()); glSurfaceView.setZOrderMediaOverlay(mapboxMapOptions.getRenderSurfaceOnTop()); mapRenderer = new GLSurfaceViewMapRenderer(getContext(), glSurfaceView, localFontFamily) { @Override @@ -505,7 +507,7 @@ public class MapView extends FrameLayout implements NativeMapView.ViewCallback { */ @UiThread public void onLowMemory() { - if (nativeMapView != null && mapboxMap != null && !destroyed ) { + if (nativeMapView != null && mapboxMap != null && !destroyed) { nativeMapView.onLowMemory(); } } @@ -745,7 +747,6 @@ public class MapView extends FrameLayout implements NativeMapView.ViewCallback { } /** - * * Set a callback that's invoked when the style has finished loading. * * @param listener The callback that's invoked when the style has finished loading @@ -801,12 +802,14 @@ public class MapView extends FrameLayout implements NativeMapView.ViewCallback { /** * Set a callback that's invoked when map needs to release unused image resources. - * + * <p> * A callback will be called only for unused images that were provided by the client via * {@link OnStyleImageMissingListener#onStyleImageMissing(String)} listener interface. - * + * </p> + * <p> * By default, platform will remove unused images from the style. By adding listener, default * behavior can be overridden and client can control whether to release unused resources. + * </p> * * @param listener The callback that's invoked when map needs to release unused image resources */ @@ -816,9 +819,10 @@ public class MapView extends FrameLayout implements NativeMapView.ViewCallback { /** * Removes a callback that's invoked when map needs to release unused image resources. - * + * <p> * When all listeners are removed, platform will fallback to default behavior, which is to remove * unused images from the style. + * </p> * * @param listener The callback that's invoked when map needs to release unused image resources */ |