
public class MinimapOverlay extends TilesOverlay
TilesOverlay.OverlayTileLooperOverlay.SnappableINVERT_COLORS, mDebugPaint, MENU_MAP_MODE, MENU_OFFLINE, MENU_SNAPSHOT, MENU_STATES, MENU_TILE_SOURCE_STARTING_ID, mProjection, mTileProvider, mViewPort, negate, userSelectedLoadingDrawablemBounds, SHADOW_X_SKEW, SHADOW_Y_SCALEDEFAULT_ZOOMLEVEL_MINIMAP_DIFFERENCE, NOT_SET| Constructor and Description |
|---|
MinimapOverlay(Context pContext,
Handler pTileRequestCompleteHandler)
Creates a
MinimapOverlay that uses its own MapTileProviderBasic. |
MinimapOverlay(Context pContext,
Handler pTileRequestCompleteHandler,
MapTileProviderBase pTileProvider)
Creates a
MinimapOverlay with the supplied tile provider. |
MinimapOverlay(Context pContext,
Handler pTileRequestCompleteHandler,
MapTileProviderBase pTileProvider,
int pZoomDifference)
Creates a
MinimapOverlay with the supplied tile provider. |
| Modifier and Type | Method and Description |
|---|---|
void |
draw(Canvas c,
Projection pProjection) |
int |
getHeight()
Gets the height of the mini-map in pixels
|
int |
getPadding()
Gets the number of pixels from the lower-right corner to offset the mini-map
|
int |
getWidth()
Gets the width of the mini-map in pixels
|
int |
getZoomDifference() |
boolean |
isOptionsMenuEnabled()
Can be used to signal to external callers that this Overlay should not be used for providing
option menu items.
|
boolean |
onDoubleTap(MotionEvent pEvent,
MapView pMapView)
By default does nothing (
return false). |
boolean |
onLongPress(MotionEvent pEvent,
MapView pMapView)
By default does nothing (
return false). |
boolean |
onSingleTapUp(MotionEvent pEvent,
MapView pMapView)
By default does nothing (
return false). |
void |
setHeight(int height)
Sets the height of the mini-map in pixels
|
void |
setPadding(int padding)
Sets the number of pixels from the lower-right corner to offset the mini-map
|
void |
setTileSource(ITileSource pTileSource) |
protected boolean |
setViewPort(Canvas pCanvas,
Projection pProjection)
Get the area we are drawing to
|
void |
setWidth(int width)
Sets the width of the mini-map in pixels
|
void |
setZoomDifference(int zoomDifference) |
drawTiles, getCanvasRect, getLoadingBackgroundColor, getLoadingLineColor, getMaximumZoomLevel, getMinimumZoomLevel, getProjection, getTileStates, isHorizontalWrapEnabled, isVerticalWrapEnabled, onCreateOptionsMenu, onDetach, onOptionsItemSelected, onPrepareOptionsMenu, onTileReadyToDraw, protectDisplayedTilesForCache, setCanvasRect, setColorFilter, setHorizontalWrapEnabled, setLoadingBackgroundColor, setLoadingDrawable, setLoadingLineColor, setOptionsMenuEnabled, setProjection, setUseDataConnection, setVerticalWrapEnabled, useDataConnectiondraw, drawAt, getBounds, getSafeMenuId, getSafeMenuIdSequence, isEnabled, onDoubleTapEvent, onDown, onFling, onKeyDown, onKeyUp, onPause, onResume, onScroll, onShowPress, onSingleTapConfirmed, onTouchEvent, onTrackballEvent, setEnabledpublic MinimapOverlay(Context pContext, Handler pTileRequestCompleteHandler, MapTileProviderBase pTileProvider, int pZoomDifference)
MinimapOverlay with the supplied tile provider. The Handler passed
in is typically the same handler being used by the main map. The MapTileProviderBase
passed in cannot be the same tile provider used in the TilesOverlay, it must be a new
instance.pContext - a contextpTileRequestCompleteHandler - a handler for the tile request complete notificationspTileProvider - a tile providerpublic MinimapOverlay(Context pContext, Handler pTileRequestCompleteHandler, MapTileProviderBase pTileProvider)
MinimapOverlay with the supplied tile provider. The Handler passed
in is typically the same handler being used by the main map. The MapTileProviderBase
passed in cannot be the same tile provider used in the TilesOverlay, it must be a new
instance.pContext - a contextpTileRequestCompleteHandler - a handler for the tile request complete notificationspTileProvider - a tile providerpublic MinimapOverlay(Context pContext, Handler pTileRequestCompleteHandler)
MinimapOverlay that uses its own MapTileProviderBasic. The
Handler passed in is typically the same handler being used by the main map.pContext - a contextpTileRequestCompleteHandler - a handler for tile request complete notificationspublic void setTileSource(ITileSource pTileSource)
public int getZoomDifference()
public void setZoomDifference(int zoomDifference)
public void draw(Canvas c, Projection pProjection)
draw in class TilesOverlaypublic boolean onSingleTapUp(MotionEvent pEvent, MapView pMapView)
Overlayreturn false). If you handled the Event, return true
, otherwise return false. If you returned true none of the following Overlays
or the underlying MapView has the chance to handle this event.onSingleTapUp in class Overlaypublic boolean onDoubleTap(MotionEvent pEvent, MapView pMapView)
Overlayreturn false). If you handled the Event, return true
, otherwise return false. If you returned true none of the following Overlays
or the underlying MapView has the chance to handle this event.onDoubleTap in class Overlaypublic boolean onLongPress(MotionEvent pEvent, MapView pMapView)
Overlayreturn false). If you handled the Event, return true
, otherwise return false. If you returned true none of the following Overlays
or the underlying MapView has the chance to handle this event.onLongPress in class Overlaypublic boolean isOptionsMenuEnabled()
IOverlayMenuProviderisOptionsMenuEnabled in interface IOverlayMenuProviderisOptionsMenuEnabled in class TilesOverlaypublic void setWidth(int width)
width - the width to set in pixelspublic int getWidth()
public void setHeight(int height)
height - the height to set in pixelspublic int getHeight()
public void setPadding(int padding)
padding - the padding to set in pixelspublic int getPadding()
protected boolean setViewPort(Canvas pCanvas, Projection pProjection)
TilesOverlaysetViewPort in class TilesOverlay