add missing DPI bitmaps and update based on code review comments

This commit is contained in:
Manabu Shimobe
2015-10-16 20:20:00 +09:00
parent 84c8d1fd6e
commit d4aebbf879
11 changed files with 38 additions and 4 deletions

View File

@@ -28,4 +28,4 @@ public class CoordinateBounds {
public void setNe(LatLng ne) {
this.ne = ne;
}
}
}

View File

@@ -1986,14 +1986,37 @@ public final class MapView extends FrameLayout {
//
// Camera
//
/**
* Changes the map's viewport to fit the given coordinate bounds.
*
* @param bounds The bounds that the viewport will show in its entirety.
*/
@UiThread
public void setVisibleCoordinateBounds(@NonNull CoordinateBounds bounds) {
setVisibleCoordinateBounds(bounds, false);
}
/**
* Changes the map's viewing area to fit the given coordinate bounds, optionally animating the change.
*
* @param bounds The bounds that the viewport will show in its entirety.
* @param animated If true, animates the change. If false, immediately changes the map.
*/
@UiThread
public void setVisibleCoordinateBounds(@NonNull CoordinateBounds bounds, boolean animated) {
setVisibleCoordinateBounds(bounds, new RectF(), animated);
}
/**
* Changes the map’s viewport to fit the given coordinate bounds, optionally some additional padding on each side
* and animating the change.
*
* @param bounds The bounds that the viewport will show in its entirety.
* @param padding The minimum padding (in pixels) that will be visible around the given coordinate bounds.
* @param animated If true, animates the change. If false, immediately changes the map.
*/
@UiThread
public void setVisibleCoordinateBounds(@NonNull CoordinateBounds bounds, @NonNull RectF padding, boolean animated) {
LatLng[] coordinates = {
new LatLng(bounds.getNe().getLatitude(), bounds.getSw().getLongitude()),
@@ -2005,6 +2028,15 @@ public final class MapView extends FrameLayout {
setVisibleCoordinateBounds(coordinates, padding, animated);
}
/**
* Changes the map’s viewport to fit the given coordinates, optionally some additional padding on each side
* and animating the change.
*
* @param coordinates The coordinates that the viewport will show.
* @param padding The minimum padding (in pixels) that will be visible around the given coordinate bounds.
* @param animated If true, animates the change. If false, immediately changes the map.
*/
@UiThread
public void setVisibleCoordinateBounds(@NonNull LatLng[] coordinates, @NonNull RectF padding, boolean animated) {
setVisibleCoordinateBounds(coordinates, padding, getDirection(), animated);
}

View File

@@ -597,7 +597,8 @@ final class NativeMapView {
private native void nativeSetSprite(long nativeMapViewPtr, String symbol,
int width, int height, float scale, byte[] pixels);
private native void nativeSetVisibleCoordinateBounds(long mNativeMapViewPtr, LatLng[] coordinates, RectF padding, double direction, long duration);
private native void nativeSetVisibleCoordinateBounds(long mNativeMapViewPtr, LatLng[] coordinates,
RectF padding, double direction, long duration);
private native void nativeOnLowMemory(long nativeMapViewPtr);