From 2d41cdc93c08ffafbfb6a89786ad788ae00de752 Mon Sep 17 00:00:00 2001 From: Chris Loer Date: Tue, 22 May 2018 10:19:32 -0400 Subject: [android, docs] Address review comments: - Use

instead of
in javadoc - Don't link outside of MapboxGLAndroidSDK - Revert addOverlay to protected - Restrict "region" override warning to camera position target --- .../java/com/mapbox/mapboxsdk/maps/MapboxMap.java | 2 +- .../mapboxsdk/snapshotter/MapSnapshotter.java | 21 +++++++++------------ 2 files changed, 10 insertions(+), 13 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 233e4aa689..98804cd0aa 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 @@ -2047,7 +2047,7 @@ public final class MapboxMap { // /** - * Renders a snapshot of the current map state as a {@link Bitmap}. + * Renders a snapshot of the current map state as a Bitmap. * Rendering does not wait for tiles to load or for animations to finish. * To render a single static map image in the background, consider using * {@link com.mapbox.mapboxsdk.snapshotter.MapSnapshotter} diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/snapshotter/MapSnapshotter.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/snapshotter/MapSnapshotter.java index 8b64dfb86d..bd882a36da 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/snapshotter/MapSnapshotter.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/snapshotter/MapSnapshotter.java @@ -29,10 +29,8 @@ import com.mapbox.mapboxsdk.storage.FileSource; import timber.log.Timber; /** - * Use MapSnapshotter to create static map images, rendered in the background. - *
- * MapSnapshotter itself must be used on the UI thread (for access to the main looper). - *
+ *

Use MapSnapshotter to create static map images, rendered in the background.

+ *

MapSnapshotter itself must be used on the UI thread (for access to the main looper).

* For an example of using MapSnapshotter, see MapSnapshotterActivity.java */ @UiThread @@ -79,11 +77,10 @@ public class MapSnapshotter { private ErrorHandler errorHandler; /** - * Specifies the parameters for drawing a static map image using MapSnapshotter. - *

- * The width and height of the image must be specified.
- * Set the Mapbox Style to use with the {@link Options#withStyle(String)} method.
- * Set the camera position for the snapshot with {@link Options#withCameraPosition(CameraPosition)}. + *

Specifies the parameters for drawing a static map image using MapSnapshotter.

+ *

The width and height of the image must be specified.

+ *

Set the Mapbox Style to use with the {@link Options#withStyle(String)} method.

+ *

Set the camera position for the snapshot with {@link Options#withCameraPosition(CameraPosition)}.

*/ public static class Options { private float pixelRatio = 1; @@ -118,7 +115,7 @@ public class MapSnapshotter { /** * @param region The region to show in the snapshot. * If the {@link CameraPosition} is also set, - * the camera position will be overridden to match the specified region. + * the {@link CameraPosition#target} will be overridden to match the specified region. * @return The mutated {@link Options} */ public Options withRegion(LatLngBounds region) { @@ -137,7 +134,7 @@ public class MapSnapshotter { /** * @param cameraPosition The {@link CameraPosition} to use for the snapshot. - * Setting a {@link LatLngBounds} region will override the camera position. + * Setting a {@link LatLngBounds} region will override the {@link CameraPosition#target}. * @return The mutated {@link Options} */ public Options withCameraPosition(CameraPosition cameraPosition) { @@ -296,7 +293,7 @@ public class MapSnapshotter { * * @param mapSnapshot the map snapshot to draw the overlay on */ - private void addOverlay(MapSnapshot mapSnapshot) { + protected void addOverlay(MapSnapshot mapSnapshot) { Bitmap snapshot = mapSnapshot.getBitmap(); Canvas canvas = new Canvas(snapshot); int margin = (int) context.getResources().getDisplayMetrics().density * LOGO_MARGIN_DP; -- cgit v1.2.1