public class MinimapOverlay extends TilesOverlay
Overlay.Snappable
mDebugPaint, MENU_MAP_MODE, MENU_OFFLINE, MENU_TILE_SOURCE_STARTING_ID, mTileProvider
mResourceProxy, mScale, SHADOW_X_SKEW, SHADOW_Y_SCALE
DEBUGMODE, DEFAULT_ZOOMLEVEL_MINIMAP_DIFFERENCE, NOT_SET
Constructor and Description |
---|
MinimapOverlay(android.content.Context pContext,
android.os.Handler pTileRequestCompleteHandler)
Creates a
MinimapOverlay that uses its own MapTileProviderBasic . |
MinimapOverlay(android.content.Context pContext,
android.os.Handler pTileRequestCompleteHandler,
MapTileProviderBase pTileProvider)
Creates a
MinimapOverlay with the supplied tile provider. |
MinimapOverlay(android.content.Context pContext,
android.os.Handler pTileRequestCompleteHandler,
MapTileProviderBase pTileProvider,
int pZoomDifference)
Creates a
MinimapOverlay with the supplied tile provider. |
Modifier and Type | Method and Description |
---|---|
protected void |
draw(android.graphics.Canvas c,
MapView osmv,
boolean shadow)
Draw the overlay over the map.
|
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(android.view.MotionEvent pEvent,
MapView pMapView)
By default does nothing (
return false ). |
boolean |
onLongPress(android.view.MotionEvent pEvent,
MapView pMapView)
By default does nothing (
return false ). |
boolean |
onSingleTapUp(android.view.MotionEvent pEvent,
MapView pMapView)
By default does nothing (
return false ). |
protected void |
onTileReadyToDraw(android.graphics.Canvas c,
android.graphics.drawable.Drawable currentMapTile,
android.graphics.Rect tileRect) |
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) |
void |
setWidth(int width)
Sets the width of the mini-map in pixels
|
void |
setZoomDifference(int zoomDifference) |
drawTiles, getLoadingBackgroundColor, getLoadingLineColor, getMaximumZoomLevel, getMinimumZoomLevel, getOvershootTileCache, onCreateOptionsMenu, onDetach, onOptionsItemSelected, onPrepareOptionsMenu, setLoadingBackgroundColor, setLoadingLineColor, setOptionsMenuEnabled, setOvershootTileCache, setUseDataConnection, useDataConnection
drawAt, getSafeMenuId, getSafeMenuIdSequence, isEnabled, onDoubleTapEvent, onDown, onFling, onKeyDown, onKeyUp, onScroll, onShowPress, onSingleTapConfirmed, onTouchEvent, onTrackballEvent, setEnabled
public MinimapOverlay(android.content.Context pContext, android.os.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(android.content.Context pContext, android.os.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(android.content.Context pContext, android.os.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)
protected void draw(android.graphics.Canvas c, MapView osmv, boolean shadow)
Overlay
draw
in class TilesOverlay
protected void onTileReadyToDraw(android.graphics.Canvas c, android.graphics.drawable.Drawable currentMapTile, android.graphics.Rect tileRect)
onTileReadyToDraw
in class TilesOverlay
public boolean onSingleTapUp(android.view.MotionEvent pEvent, MapView pMapView)
Overlay
return 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 Overlay
public boolean onDoubleTap(android.view.MotionEvent pEvent, MapView pMapView)
Overlay
return 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 Overlay
public boolean onLongPress(android.view.MotionEvent pEvent, MapView pMapView)
Overlay
return 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 Overlay
public boolean isOptionsMenuEnabled()
IOverlayMenuProvider
isOptionsMenuEnabled
in interface IOverlayMenuProvider
isOptionsMenuEnabled
in class TilesOverlay
public 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()
Copyright © 2015. All Rights Reserved.