public class MapView extends android.view.ViewGroup implements IMapView, MapViewConstants, MultiTouchController.MultiTouchObjectCanvas<Object>
Modifier and Type | Class and Description |
---|---|
static class |
MapView.LayoutParams
Per-child layout information associated with OpenStreetMapView.
|
class |
MapView.Projection
A Projection serves to translate between the coordinate system of x/y on-screen pixel
coordinates and that of latitude/longitude points on the surface of the earth.
|
android.view.ViewGroup.MarginLayoutParams, android.view.ViewGroup.OnHierarchyChangeListener
android.view.View.AccessibilityDelegate, android.view.View.BaseSavedState, android.view.View.DragShadowBuilder, android.view.View.MeasureSpec, android.view.View.OnAttachStateChangeListener, android.view.View.OnClickListener, android.view.View.OnCreateContextMenuListener, android.view.View.OnDragListener, android.view.View.OnFocusChangeListener, android.view.View.OnGenericMotionListener, android.view.View.OnHoverListener, android.view.View.OnKeyListener, android.view.View.OnLayoutChangeListener, android.view.View.OnLongClickListener, android.view.View.OnSystemUiVisibilityChangeListener, android.view.View.OnTouchListener
Modifier and Type | Field and Description |
---|---|
protected AtomicBoolean |
mIsAnimating |
protected boolean |
mIsFlinging |
protected MapListener |
mListener |
protected Integer |
mMaximumZoomLevel |
protected Integer |
mMinimumZoomLevel |
protected float |
mMultiTouchScale |
protected android.graphics.PointF |
mMultiTouchScalePoint |
protected BoundingBoxE6 |
mScrollableAreaBoundingBox |
protected android.graphics.Rect |
mScrollableAreaLimit |
protected AtomicInteger |
mTargetZoomLevel |
CLIP_TO_PADDING_MASK, FOCUS_AFTER_DESCENDANTS, FOCUS_BEFORE_DESCENDANTS, FOCUS_BLOCK_DESCENDANTS, PERSISTENT_ALL_CACHES, PERSISTENT_ANIMATION_CACHE, PERSISTENT_NO_CACHE, PERSISTENT_SCROLLING_CACHE
ALPHA, DRAWING_CACHE_QUALITY_AUTO, DRAWING_CACHE_QUALITY_HIGH, DRAWING_CACHE_QUALITY_LOW, EMPTY_STATE_SET, ENABLED_FOCUSED_SELECTED_STATE_SET, ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, ENABLED_FOCUSED_STATE_SET, ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET, ENABLED_SELECTED_STATE_SET, ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET, ENABLED_STATE_SET, ENABLED_WINDOW_FOCUSED_STATE_SET, FIND_VIEWS_WITH_CONTENT_DESCRIPTION, FIND_VIEWS_WITH_TEXT, FOCUS_BACKWARD, FOCUS_DOWN, FOCUS_FORWARD, FOCUS_LEFT, FOCUS_RIGHT, FOCUS_UP, FOCUSABLES_ALL, FOCUSABLES_TOUCH_MODE, FOCUSED_SELECTED_STATE_SET, FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, FOCUSED_STATE_SET, FOCUSED_WINDOW_FOCUSED_STATE_SET, GONE, HAPTIC_FEEDBACK_ENABLED, IMPORTANT_FOR_ACCESSIBILITY_AUTO, IMPORTANT_FOR_ACCESSIBILITY_NO, IMPORTANT_FOR_ACCESSIBILITY_YES, INVISIBLE, KEEP_SCREEN_ON, LAYER_TYPE_HARDWARE, LAYER_TYPE_NONE, LAYER_TYPE_SOFTWARE, MEASURED_HEIGHT_STATE_SHIFT, MEASURED_SIZE_MASK, MEASURED_STATE_MASK, MEASURED_STATE_TOO_SMALL, NO_ID, OVER_SCROLL_ALWAYS, OVER_SCROLL_IF_CONTENT_SCROLLS, OVER_SCROLL_NEVER, PRESSED_ENABLED_FOCUSED_SELECTED_STATE_SET, PRESSED_ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_FOCUSED_STATE_SET, PRESSED_ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_SELECTED_STATE_SET, PRESSED_ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_STATE_SET, PRESSED_ENABLED_WINDOW_FOCUSED_STATE_SET, PRESSED_FOCUSED_SELECTED_STATE_SET, PRESSED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_FOCUSED_STATE_SET, PRESSED_FOCUSED_WINDOW_FOCUSED_STATE_SET, PRESSED_SELECTED_STATE_SET, PRESSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_WINDOW_FOCUSED_STATE_SET, ROTATION, ROTATION_X, ROTATION_Y, SCALE_X, SCALE_Y, SCREEN_STATE_OFF, SCREEN_STATE_ON, SCROLLBAR_POSITION_DEFAULT, SCROLLBAR_POSITION_LEFT, SCROLLBAR_POSITION_RIGHT, SCROLLBARS_INSIDE_INSET, SCROLLBARS_INSIDE_OVERLAY, SCROLLBARS_OUTSIDE_INSET, SCROLLBARS_OUTSIDE_OVERLAY, SELECTED_STATE_SET, SELECTED_WINDOW_FOCUSED_STATE_SET, SOUND_EFFECTS_ENABLED, STATUS_BAR_HIDDEN, STATUS_BAR_VISIBLE, SYSTEM_UI_FLAG_FULLSCREEN, SYSTEM_UI_FLAG_HIDE_NAVIGATION, SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN, SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION, SYSTEM_UI_FLAG_LAYOUT_STABLE, SYSTEM_UI_FLAG_LOW_PROFILE, SYSTEM_UI_FLAG_VISIBLE, SYSTEM_UI_LAYOUT_FLAGS, TEXT_ALIGNMENT_INHERIT, TEXT_ALIGNMENT_RESOLVED_DEFAULT, TRANSLATION_X, TRANSLATION_Y, VIEW_LOG_TAG, VISIBLE, WINDOW_FOCUSED_STATE_SET, X, Y
ANIMATION_DURATION_DEFAULT, ANIMATION_DURATION_LONG, ANIMATION_DURATION_SHORT, ANIMATION_SMOOTHNESS_DEFAULT, ANIMATION_SMOOTHNESS_HIGH, ANIMATION_SMOOTHNESS_LOW, DEBUGMODE, MAXIMUM_ZOOMLEVEL, MINIMUM_ZOOMLEVEL, NOT_SET
Modifier | Constructor and Description |
---|---|
|
MapView(android.content.Context context,
android.util.AttributeSet attrs)
Constructor used by XML layout resource (uses default tile source).
|
|
MapView(android.content.Context context,
int tileSizePixels)
Standard Constructor.
|
|
MapView(android.content.Context context,
int tileSizePixels,
ResourceProxy resourceProxy) |
|
MapView(android.content.Context context,
int tileSizePixels,
ResourceProxy resourceProxy,
MapTileProviderBase aTileProvider) |
|
MapView(android.content.Context context,
int tileSizePixels,
ResourceProxy resourceProxy,
MapTileProviderBase aTileProvider,
android.os.Handler tileRequestCompleteHandler) |
protected |
MapView(android.content.Context context,
int tileSizePixels,
ResourceProxy resourceProxy,
MapTileProviderBase tileProvider,
android.os.Handler tileRequestCompleteHandler,
android.util.AttributeSet attrs) |
Modifier and Type | Method and Description |
---|---|
boolean |
canZoomIn() |
boolean |
canZoomOut() |
protected boolean |
checkLayoutParams(android.view.ViewGroup.LayoutParams p) |
void |
computeScroll() |
protected void |
dispatchDraw(android.graphics.Canvas c) |
boolean |
dispatchTouchEvent(android.view.MotionEvent event) |
protected android.view.ViewGroup.LayoutParams |
generateDefaultLayoutParams()
Returns a set of layout parameters with a width of
ViewGroup.LayoutParams.WRAP_CONTENT , a height of
ViewGroup.LayoutParams.WRAP_CONTENT at the GeoPoint (0, 0) align
with MapView.LayoutParams.BOTTOM_CENTER . |
android.view.ViewGroup.LayoutParams |
generateLayoutParams(android.util.AttributeSet attrs) |
protected android.view.ViewGroup.LayoutParams |
generateLayoutParams(android.view.ViewGroup.LayoutParams p) |
BoundingBoxE6 |
getBoundingBox() |
BoundingBoxE6 |
getBoundingBox(int pViewWidth,
int pViewHeight) |
IMapController |
getController() |
Object |
getDraggableObjectAtPoint(MultiTouchController.PointInfo pt)
See if there is a draggable object at the current point.
|
android.graphics.Rect |
getIntrinsicScreenRect(android.graphics.Rect reuse) |
int |
getLatitudeSpan() |
int |
getLongitudeSpan() |
IGeoPoint |
getMapCenter()
Returns the current center-point position of the map, as a GeoPoint (latitude and longitude).
|
float |
getMapOrientation() |
int |
getMaxZoomLevel()
Get the maximum allowed zoom level for the maps.
|
int |
getMinZoomLevel()
Get the minimum allowed zoom level for the maps.
|
OverlayManager |
getOverlayManager() |
List<Overlay> |
getOverlays()
You can add/remove/reorder your Overlays using the List of
Overlay . |
void |
getPositionAndScale(Object obj,
MultiTouchController.PositionAndScale objPosAndScaleOut)
Get the screen coords of the dragged object's origin, and scale multiplier to convert screen coords to obj coords.
|
MapView.Projection |
getProjection()
Get a projection for converting between screen-pixel coordinates and latitude/longitude
coordinates.
|
ResourceProxy |
getResourceProxy() |
android.graphics.Rect |
getScreenRect(android.graphics.Rect reuse)
Gets the current bounds of the screen in screen coordinates.
|
BoundingBoxE6 |
getScrollableAreaLimit() |
android.widget.Scroller |
getScroller() |
MapTileProviderBase |
getTileProvider() |
android.os.Handler |
getTileRequestCompleteHandler() |
int |
getZoomLevel()
Get the current ZoomLevel for the map tiles.
|
int |
getZoomLevel(boolean aPending)
Get the current ZoomLevel for the map tiles.
|
void |
invalidateMapCoordinates(int left,
int top,
int right,
int bottom) |
void |
invalidateMapCoordinates(android.graphics.Rect dirty) |
boolean |
isAnimating()
Determines if maps are animating a zoom operation.
|
boolean |
isUsingSafeCanvas()
Returns true if the safe drawing canvas is being used.
|
void |
onDetach() |
protected void |
onDetachedFromWindow() |
boolean |
onKeyDown(int keyCode,
android.view.KeyEvent event) |
boolean |
onKeyUp(int keyCode,
android.view.KeyEvent event) |
protected void |
onLayout(boolean changed,
int l,
int t,
int r,
int b) |
protected void |
onMeasure(int widthMeasureSpec,
int heightMeasureSpec) |
boolean |
onTouchEvent(android.view.MotionEvent event) |
boolean |
onTrackballEvent(android.view.MotionEvent event) |
void |
scrollTo(int x,
int y) |
void |
selectObject(Object obj,
MultiTouchController.PointInfo pt)
Select an object at the given point.
|
void |
setBackgroundColor(int pColor) |
void |
setBuiltInZoomControls(boolean on) |
void |
setMapListener(MapListener ml) |
void |
setMapOrientation(float degrees) |
void |
setMaxZoomLevel(Integer zoomLevel)
Set the maximum allowed zoom level, or pass null to use the maximum zoom level from the tile
provider.
|
void |
setMinZoomLevel(Integer zoomLevel)
Set the minimum allowed zoom level, or pass null to use the minimum zoom level from the tile
provider.
|
void |
setMultiTouchControls(boolean on) |
boolean |
setPositionAndScale(Object obj,
MultiTouchController.PositionAndScale aNewObjPosAndScale,
MultiTouchController.PointInfo aTouchPoint)
Callback to update the position and scale (in object coords) of the currently-dragged object.
|
void |
setScrollableAreaLimit(BoundingBoxE6 boundingBox)
Set the map to limit it's scrollable view to the specified BoundingBoxE6.
|
void |
setTileSource(ITileSource aTileSource) |
void |
setUseDataConnection(boolean aMode)
Set whether to use the network connection if it's available.
|
void |
setUseSafeCanvas(boolean useSafeCanvas)
Sets whether the safe drawing canvas is being used.
|
boolean |
useDataConnection()
Whether to use the network connection if it's available.
|
void |
zoomToBoundingBox(BoundingBoxE6 boundingBox)
Zoom the map to enclose the specified bounding box, as closely as possible.
|
addChildrenForAccessibility, addFocusables, addStatesFromChildren, addTouchables, addView, addView, addView, addView, addView, addViewInLayout, addViewInLayout, attachLayoutAnimationParameters, attachViewToParent, bringChildToFront, canAnimate, childDrawableStateChanged, cleanupLayoutState, clearChildFocus, clearDisappearingChildren, clearFocus, debug, detachAllViewsFromParent, detachViewFromParent, detachViewFromParent, detachViewsFromParent, dispatchConfigurationChanged, dispatchDisplayHint, dispatchDragEvent, dispatchFreezeSelfOnly, dispatchGenericFocusedEvent, dispatchGenericPointerEvent, dispatchHoverEvent, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchRestoreInstanceState, dispatchSaveInstanceState, dispatchSetActivated, dispatchSetPressed, dispatchSetSelected, dispatchSystemUiVisibilityChanged, dispatchThawSelfOnly, dispatchTrackballEvent, dispatchUnhandledMove, dispatchVisibilityChanged, dispatchWindowFocusChanged, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, drawableStateChanged, drawChild, endViewTransition, findFocus, findViewsWithText, fitSystemWindows, focusableViewAvailable, focusSearch, gatherTransparentRegion, getChildAt, getChildCount, getChildDrawingOrder, getChildMeasureSpec, getChildStaticTransformation, getChildVisibleRect, getDescendantFocusability, getFocusedChild, getLayoutAnimation, getLayoutAnimationListener, getLayoutTransition, getPersistentDrawingCache, hasFocus, hasFocusable, indexOfChild, invalidateChild, invalidateChildInParent, isAlwaysDrawnWithCacheEnabled, isAnimationCacheEnabled, isChildrenDrawingOrderEnabled, isChildrenDrawnWithCacheEnabled, isMotionEventSplittingEnabled, jumpDrawablesToCurrentState, layout, measureChild, measureChildren, measureChildWithMargins, offsetDescendantRectToMyCoords, offsetRectIntoDescendantCoords, onAnimationEnd, onAnimationStart, onCreateDrawableState, onInterceptHoverEvent, onInterceptTouchEvent, onRequestFocusInDescendants, onRequestSendAccessibilityEvent, recomputeViewAttributes, removeAllViews, removeAllViewsInLayout, removeDetachedView, removeView, removeViewAt, removeViewInLayout, removeViews, removeViewsInLayout, requestChildFocus, requestChildRectangleOnScreen, requestDisallowInterceptTouchEvent, requestFocus, requestSendAccessibilityEvent, requestTransparentRegion, scheduleLayoutAnimation, setAddStatesFromChildren, setAlwaysDrawnWithCacheEnabled, setAnimationCacheEnabled, setChildrenDrawingCacheEnabled, setChildrenDrawingOrderEnabled, setChildrenDrawnWithCacheEnabled, setClipChildren, setClipToPadding, setDescendantFocusability, setLayoutAnimation, setLayoutAnimationListener, setLayoutTransition, setMotionEventSplittingEnabled, setOnHierarchyChangeListener, setPadding, setPersistentDrawingCache, setStaticTransformationsEnabled, shouldDelayChildPressedState, showContextMenuForChild, startActionModeForChild, startLayoutAnimation, startViewTransition, updateViewLayout
addFocusables, addOnAttachStateChangeListener, addOnLayoutChangeListener, animate, announceForAccessibility, awakenScrollBars, awakenScrollBars, awakenScrollBars, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, callOnClick, cancelLongPress, canScrollHorizontally, canScrollVertically, checkInputConnectionProxy, clearAnimation, combineMeasuredStates, computeHorizontalScrollExtent, computeHorizontalScrollOffset, computeHorizontalScrollRange, computeVerticalScrollExtent, computeVerticalScrollOffset, computeVerticalScrollRange, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchGenericMotionEvent, dispatchPopulateAccessibilityEvent, draw, findViewById, findViewWithTag, focusSearch, forceLayout, getAccessibilityNodeProvider, getAlpha, getAnimation, getApplicationWindowToken, getBackground, getBaseline, getBottom, getBottomFadingEdgeStrength, getBottomPaddingOffset, getCameraDistance, getContentDescription, getContext, getContextMenuInfo, getDefaultSize, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusables, getFocusedRect, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHeight, getHitRect, getHorizontalFadingEdgeLength, getHorizontalScrollbarHeight, getId, getImportantForAccessibility, getKeepScreenOn, getKeyDispatcherState, getLayerType, getLayoutParams, getLeft, getLeftFadingEdgeStrength, getLeftPaddingOffset, getLocalVisibleRect, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getMinimumHeight, getMinimumWidth, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOverScrollMode, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getParent, getParentForAccessibility, getPivotX, getPivotY, getResources, getRight, getRightFadingEdgeStrength, getRightPaddingOffset, getRootView, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollX, getScrollY, getSolidColor, getSuggestedMinimumHeight, getSuggestedMinimumWidth, getSystemUiVisibility, getTag, getTag, getTop, getTopFadingEdgeStrength, getTopPaddingOffset, getTouchables, getTouchDelegate, getTranslationX, getTranslationY, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarWidth, getViewTreeObserver, getVisibility, getWidth, getWindowAttachCount, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, hasOnClickListeners, hasOverlappingRendering, hasTransientState, hasWindowFocus, inflate, initializeFadingEdge, initializeScrollbars, invalidate, invalidate, invalidate, invalidateDrawable, isActivated, isClickable, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isInEditMode, isInTouchMode, isLayoutRequested, isLongClickable, isOpaque, isPaddingOffsetRequired, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScrollbarFadingEnabled, isScrollContainer, isSelected, isShown, isSoundEffectsEnabled, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, measure, mergeDrawableStates, offsetLeftAndRight, offsetTopAndBottom, onAttachedToWindow, onCheckIsTextEditor, onConfigurationChanged, onCreateContextMenu, onCreateInputConnection, onDisplayHint, onDragEvent, onDraw, onDrawScrollBars, onFilterTouchEventForSecurity, onFinishInflate, onFinishTemporaryDetach, onFocusChanged, onGenericMotionEvent, onHoverChanged, onHoverEvent, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onOverScrolled, onPopulateAccessibilityEvent, onRestoreInstanceState, onSaveInstanceState, onScreenStateChanged, onScrollChanged, onSetAlpha, onSizeChanged, onStartTemporaryDetach, onVisibilityChanged, onWindowFocusChanged, onWindowSystemUiVisibilityChanged, onWindowVisibilityChanged, overScrollBy, performAccessibilityAction, performClick, performHapticFeedback, performHapticFeedback, performLongClick, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, postInvalidateOnAnimation, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, refreshDrawableState, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, requestFitSystemWindows, requestFocus, requestFocus, requestFocusFromTouch, requestLayout, requestRectangleOnScreen, requestRectangleOnScreen, resolveSize, resolveSizeAndState, restoreHierarchyState, saveHierarchyState, scheduleDrawable, scrollBy, sendAccessibilityEvent, sendAccessibilityEventUnchecked, setAccessibilityDelegate, setActivated, setAlpha, setAnimation, setBackground, setBackgroundDrawable, setBackgroundResource, setBottom, setCameraDistance, setClickable, setContentDescription, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setEnabled, setFadingEdgeLength, setFilterTouchesWhenObscured, setFitsSystemWindows, setFocusable, setFocusableInTouchMode, setHapticFeedbackEnabled, setHasTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHovered, setId, setImportantForAccessibility, setKeepScreenOn, setLayerType, setLayoutParams, setLeft, setLongClickable, setMeasuredDimension, setMinimumHeight, setMinimumWidth, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnClickListener, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnSystemUiVisibilityChangeListener, setOnTouchListener, setOverScrollMode, setPivotX, setPivotY, setPressed, setRight, setRotation, setRotationX, setRotationY, setSaveEnabled, setSaveFromParentEnabled, setScaleX, setScaleY, setScrollBarDefaultDelayBeforeFade, setScrollBarFadeDuration, setScrollbarFadingEnabled, setScrollBarSize, setScrollBarStyle, setScrollContainer, setScrollX, setScrollY, setSelected, setSoundEffectsEnabled, setSystemUiVisibility, setTag, setTag, setTop, setTouchDelegate, setTranslationX, setTranslationY, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setVisibility, setWillNotCacheDrawing, setWillNotDraw, setX, setY, showContextMenu, startActionMode, startAnimation, startDrag, unscheduleDrawable, unscheduleDrawable, verifyDrawable, willNotCacheDrawing, willNotDraw
protected boolean mIsFlinging
protected final AtomicInteger mTargetZoomLevel
protected final AtomicBoolean mIsAnimating
protected Integer mMinimumZoomLevel
protected Integer mMaximumZoomLevel
protected float mMultiTouchScale
protected android.graphics.PointF mMultiTouchScalePoint
protected MapListener mListener
protected BoundingBoxE6 mScrollableAreaBoundingBox
protected android.graphics.Rect mScrollableAreaLimit
protected MapView(android.content.Context context, int tileSizePixels, ResourceProxy resourceProxy, MapTileProviderBase tileProvider, android.os.Handler tileRequestCompleteHandler, android.util.AttributeSet attrs)
public MapView(android.content.Context context, android.util.AttributeSet attrs)
public MapView(android.content.Context context, int tileSizePixels)
public MapView(android.content.Context context, int tileSizePixels, ResourceProxy resourceProxy)
public MapView(android.content.Context context, int tileSizePixels, ResourceProxy resourceProxy, MapTileProviderBase aTileProvider)
public MapView(android.content.Context context, int tileSizePixels, ResourceProxy resourceProxy, MapTileProviderBase aTileProvider, android.os.Handler tileRequestCompleteHandler)
public IMapController getController()
getController
in interface IMapView
public List<Overlay> getOverlays()
Overlay
. The first (index
0) Overlay gets drawn first, the one with the highest as the last one.public OverlayManager getOverlayManager()
public MapTileProviderBase getTileProvider()
public android.widget.Scroller getScroller()
public android.os.Handler getTileRequestCompleteHandler()
public int getLatitudeSpan()
getLatitudeSpan
in interface IMapView
public int getLongitudeSpan()
getLongitudeSpan
in interface IMapView
public BoundingBoxE6 getBoundingBox()
public BoundingBoxE6 getBoundingBox(int pViewWidth, int pViewHeight)
public android.graphics.Rect getScreenRect(android.graphics.Rect reuse)
public android.graphics.Rect getIntrinsicScreenRect(android.graphics.Rect reuse)
public MapView.Projection getProjection()
getProjection
in interface IMapView
public void setTileSource(ITileSource aTileSource)
public void zoomToBoundingBox(BoundingBoxE6 boundingBox)
public int getZoomLevel()
getZoomLevel
in interface IMapView
public int getZoomLevel(boolean aPending)
aPending
- if true and we're animating then return the zoom level that we're animating
towards, otherwise return the current zoom levelpublic int getMinZoomLevel()
public int getMaxZoomLevel()
getMaxZoomLevel
in interface IMapView
public void setMinZoomLevel(Integer zoomLevel)
public void setMaxZoomLevel(Integer zoomLevel)
public boolean canZoomIn()
public boolean canZoomOut()
public IGeoPoint getMapCenter()
getMapCenter
in interface IMapView
public ResourceProxy getResourceProxy()
public void setMapOrientation(float degrees)
public float getMapOrientation()
public boolean useDataConnection()
public void setUseDataConnection(boolean aMode)
aMode
- if true use the network connection if it's available. if false don't use the
network connection even if it's available.public void setScrollableAreaLimit(BoundingBoxE6 boundingBox)
boundingBox
- A lat/long bounding box to limit scrolling to, or null to remove any scrolling
limitationspublic BoundingBoxE6 getScrollableAreaLimit()
public void invalidateMapCoordinates(android.graphics.Rect dirty)
public void invalidateMapCoordinates(int left, int top, int right, int bottom)
protected android.view.ViewGroup.LayoutParams generateDefaultLayoutParams()
ViewGroup.LayoutParams.WRAP_CONTENT
, a height of
ViewGroup.LayoutParams.WRAP_CONTENT
at the GeoPoint
(0, 0) align
with MapView.LayoutParams.BOTTOM_CENTER
.generateDefaultLayoutParams
in class android.view.ViewGroup
public android.view.ViewGroup.LayoutParams generateLayoutParams(android.util.AttributeSet attrs)
generateLayoutParams
in class android.view.ViewGroup
protected boolean checkLayoutParams(android.view.ViewGroup.LayoutParams p)
checkLayoutParams
in class android.view.ViewGroup
protected android.view.ViewGroup.LayoutParams generateLayoutParams(android.view.ViewGroup.LayoutParams p)
generateLayoutParams
in class android.view.ViewGroup
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
onMeasure
in class android.view.View
protected void onLayout(boolean changed, int l, int t, int r, int b)
onLayout
in class android.view.ViewGroup
public void onDetach()
public boolean onKeyDown(int keyCode, android.view.KeyEvent event)
onKeyDown
in interface android.view.KeyEvent.Callback
onKeyDown
in class android.view.View
public boolean onKeyUp(int keyCode, android.view.KeyEvent event)
onKeyUp
in interface android.view.KeyEvent.Callback
onKeyUp
in class android.view.View
public boolean onTrackballEvent(android.view.MotionEvent event)
onTrackballEvent
in class android.view.View
public boolean dispatchTouchEvent(android.view.MotionEvent event)
dispatchTouchEvent
in class android.view.ViewGroup
public boolean onTouchEvent(android.view.MotionEvent event)
onTouchEvent
in class android.view.View
public void computeScroll()
computeScroll
in class android.view.View
public void scrollTo(int x, int y)
scrollTo
in class android.view.View
public void setBackgroundColor(int pColor)
setBackgroundColor
in interface IMapView
setBackgroundColor
in class android.view.View
protected void dispatchDraw(android.graphics.Canvas c)
dispatchDraw
in class android.view.ViewGroup
public boolean isUsingSafeCanvas()
ISafeCanvas}
public void setUseSafeCanvas(boolean useSafeCanvas)
ISafeCanvas}
protected void onDetachedFromWindow()
onDetachedFromWindow
in class android.view.View
public boolean isAnimating()
public Object getDraggableObjectAtPoint(MultiTouchController.PointInfo pt)
MultiTouchController.MultiTouchObjectCanvas
getDraggableObjectAtPoint
in interface MultiTouchController.MultiTouchObjectCanvas<Object>
pt
- The point being tested (in object coordinates). Return the topmost object under this point, or if dragging/stretching the whole
canvas, just return a reference to the canvas.public void getPositionAndScale(Object obj, MultiTouchController.PositionAndScale objPosAndScaleOut)
MultiTouchController.MultiTouchObjectCanvas
getPositionAndScale
in interface MultiTouchController.MultiTouchObjectCanvas<Object>
obj
- The object being dragged/stretched.objPosAndScaleOut
- Output parameter: You need to call objPosAndScaleOut.set() to record the current position and scale of obj.public void selectObject(Object obj, MultiTouchController.PointInfo pt)
MultiTouchController.MultiTouchObjectCanvas
selectObject
in interface MultiTouchController.MultiTouchObjectCanvas<Object>
obj
- The object being selected by single-touch, or null on touch-up.pt
- The current touch point.public boolean setPositionAndScale(Object obj, MultiTouchController.PositionAndScale aNewObjPosAndScale, MultiTouchController.PointInfo aTouchPoint)
MultiTouchController.MultiTouchObjectCanvas
setPositionAndScale
in interface MultiTouchController.MultiTouchObjectCanvas<Object>
obj
- The object being dragged/stretched.aNewObjPosAndScale
- The new position and scale of the object, in object coordinates. Use this to move/resize the object before returning.aTouchPoint
- Info about the current touch point, including multitouch information and utilities to calculate and cache multitouch pinch
diameter etc. (Note: touchPoint is volatile, if you want to keep any fields of touchPoint, you must copy them before the method
body exits.)public void setMapListener(MapListener ml)
public void setBuiltInZoomControls(boolean on)
public void setMultiTouchControls(boolean on)
Copyright © 2014. All Rights Reserved.