public class MapView extends ViewGroup implements IMapView, MultiTouchController.MultiTouchObjectCanvas<Object>
onPause()
and onResume()
respectivelyModifier and Type | Class and Description |
---|---|
static class |
MapView.LayoutParams
Per-child layout information associated with OpenStreetMapView.
|
static interface |
MapView.OnFirstLayoutListener |
ViewGroup.MarginLayoutParams, ViewGroup.OnHierarchyChangeListener
View.AccessibilityDelegate, View.BaseSavedState, View.DragShadowBuilder, View.MeasureSpec, View.OnApplyWindowInsetsListener, View.OnAttachStateChangeListener, View.OnCapturedPointerListener, View.OnClickListener, View.OnContextClickListener, View.OnCreateContextMenuListener, View.OnDragListener, View.OnFocusChangeListener, View.OnGenericMotionListener, View.OnHoverListener, View.OnKeyListener, View.OnLayoutChangeListener, View.OnLongClickListener, View.OnScrollChangeListener, View.OnSystemUiVisibilityChangeListener, View.OnTouchListener
Modifier and Type | Field and Description |
---|---|
protected AtomicBoolean |
mIsAnimating |
protected boolean |
mIsFlinging |
protected List<MapListener> |
mListners |
protected Double |
mMaximumZoomLevel |
protected Double |
mMinimumZoomLevel |
protected Projection |
mProjection |
(package private) Point |
mRotateScalePoint |
CLIP_TO_PADDING_MASK, FOCUS_AFTER_DESCENDANTS, FOCUS_BEFORE_DESCENDANTS, FOCUS_BLOCK_DESCENDANTS, LAYOUT_MODE_CLIP_BOUNDS, LAYOUT_MODE_OPTICAL_BOUNDS, PERSISTENT_ALL_CACHES, PERSISTENT_ANIMATION_CACHE, PERSISTENT_NO_CACHE, PERSISTENT_SCROLLING_CACHE
ACCESSIBILITY_LIVE_REGION_ASSERTIVE, ACCESSIBILITY_LIVE_REGION_NONE, ACCESSIBILITY_LIVE_REGION_POLITE, ALPHA, AUTOFILL_FLAG_INCLUDE_NOT_IMPORTANT_VIEWS, AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DATE, AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DAY, AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_MONTH, AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_YEAR, AUTOFILL_HINT_CREDIT_CARD_NUMBER, AUTOFILL_HINT_CREDIT_CARD_SECURITY_CODE, AUTOFILL_HINT_EMAIL_ADDRESS, AUTOFILL_HINT_NAME, AUTOFILL_HINT_PASSWORD, AUTOFILL_HINT_PHONE, AUTOFILL_HINT_POSTAL_ADDRESS, AUTOFILL_HINT_POSTAL_CODE, AUTOFILL_HINT_USERNAME, AUTOFILL_TYPE_DATE, AUTOFILL_TYPE_LIST, AUTOFILL_TYPE_NONE, AUTOFILL_TYPE_TEXT, AUTOFILL_TYPE_TOGGLE, DRAG_FLAG_GLOBAL, DRAG_FLAG_GLOBAL_PERSISTABLE_URI_PERMISSION, DRAG_FLAG_GLOBAL_PREFIX_URI_PERMISSION, DRAG_FLAG_GLOBAL_URI_READ, DRAG_FLAG_GLOBAL_URI_WRITE, DRAG_FLAG_OPAQUE, 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, FOCUSABLE, FOCUSABLE_AUTO, 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_NO_HIDE_DESCENDANTS, IMPORTANT_FOR_ACCESSIBILITY_YES, IMPORTANT_FOR_AUTOFILL_AUTO, IMPORTANT_FOR_AUTOFILL_NO, IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS, IMPORTANT_FOR_AUTOFILL_YES, IMPORTANT_FOR_AUTOFILL_YES_EXCLUDE_DESCENDANTS, INVISIBLE, KEEP_SCREEN_ON, LAYER_TYPE_HARDWARE, LAYER_TYPE_NONE, LAYER_TYPE_SOFTWARE, LAYOUT_DIRECTION_INHERIT, LAYOUT_DIRECTION_LOCALE, LAYOUT_DIRECTION_LTR, LAYOUT_DIRECTION_RTL, MEASURED_HEIGHT_STATE_SHIFT, MEASURED_SIZE_MASK, MEASURED_STATE_MASK, MEASURED_STATE_TOO_SMALL, NO_ID, NOT_FOCUSABLE, 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_STATE_SET, PRESSED_WINDOW_FOCUSED_STATE_SET, ROTATION, ROTATION_X, ROTATION_Y, SCALE_X, SCALE_Y, SCREEN_STATE_OFF, SCREEN_STATE_ON, SCROLL_AXIS_HORIZONTAL, SCROLL_AXIS_NONE, SCROLL_AXIS_VERTICAL, SCROLL_INDICATOR_BOTTOM, SCROLL_INDICATOR_END, SCROLL_INDICATOR_LEFT, SCROLL_INDICATOR_RIGHT, SCROLL_INDICATOR_START, SCROLL_INDICATOR_TOP, 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_IMMERSIVE, SYSTEM_UI_FLAG_IMMERSIVE_STICKY, SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN, SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION, SYSTEM_UI_FLAG_LAYOUT_STABLE, SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR, SYSTEM_UI_FLAG_LIGHT_STATUS_BAR, SYSTEM_UI_FLAG_LOW_PROFILE, SYSTEM_UI_FLAG_VISIBLE, SYSTEM_UI_LAYOUT_FLAGS, TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_GRAVITY, TEXT_ALIGNMENT_INHERIT, TEXT_ALIGNMENT_TEXT_END, TEXT_ALIGNMENT_TEXT_START, TEXT_ALIGNMENT_VIEW_END, TEXT_ALIGNMENT_VIEW_START, TEXT_DIRECTION_ANY_RTL, TEXT_DIRECTION_FIRST_STRONG, TEXT_DIRECTION_FIRST_STRONG_LTR, TEXT_DIRECTION_FIRST_STRONG_RTL, TEXT_DIRECTION_INHERIT, TEXT_DIRECTION_LOCALE, TEXT_DIRECTION_LTR, TEXT_DIRECTION_RTL, TRANSLATION_X, TRANSLATION_Y, TRANSLATION_Z, VIEW_LOG_TAG, VISIBLE, WINDOW_FOCUSED_STATE_SET, X, Y, Z
Constructor and Description |
---|
MapView(Context context) |
MapView(Context context,
AttributeSet attrs)
Constructor used by XML layout resource (uses default tile source).
|
MapView(Context context,
MapTileProviderBase aTileProvider) |
MapView(Context context,
MapTileProviderBase aTileProvider,
Handler tileRequestCompleteHandler) |
MapView(Context context,
MapTileProviderBase tileProvider,
Handler tileRequestCompleteHandler,
AttributeSet attrs) |
MapView(Context context,
MapTileProviderBase tileProvider,
Handler tileRequestCompleteHandler,
AttributeSet attrs,
boolean hardwareAccelerated) |
Modifier and Type | Method and Description |
---|---|
void |
addMapListener(MapListener mapListener)
Just like the old setMapListener, except it supports more than one
|
void |
addOnFirstLayoutListener(MapView.OnFirstLayoutListener listener)
enables you to add a listener for when the map is ready to go.
|
boolean |
canZoomIn() |
boolean |
canZoomOut() |
protected boolean |
checkLayoutParams(ViewGroup.LayoutParams p) |
void |
computeScroll() |
protected void |
dispatchDraw(Canvas c) |
boolean |
dispatchTouchEvent(MotionEvent event) |
protected 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 . |
ViewGroup.LayoutParams |
generateLayoutParams(AttributeSet attrs) |
protected ViewGroup.LayoutParams |
generateLayoutParams(ViewGroup.LayoutParams p) |
BoundingBox |
getBoundingBox() |
IMapController |
getController() |
Object |
getDraggableObjectAtPoint(MultiTouchController.PointInfo pt)
See if there is a draggable object at the current point.
|
(package private) GeoPoint |
getExpectedCenter()
Should never be used except by the constructor of Projection.
|
Rect |
getIntrinsicScreenRect(Rect reuse) |
double |
getLatitudeSpanDouble() |
double |
getLongitudeSpanDouble() |
IGeoPoint |
getMapCenter()
Returns the current center-point position of the map, as a GeoPoint (latitude and longitude).
|
IGeoPoint |
getMapCenter(GeoPoint pReuse) |
int |
getMapCenterOffsetX() |
int |
getMapCenterOffsetY() |
float |
getMapOrientation() |
TilesOverlay |
getMapOverlay() |
float |
getMapScale()
Deprecated.
|
long |
getMapScrollX() |
long |
getMapScrollY() |
double |
getMaxZoomLevel()
Get the maximum allowed zoom level for the maps.
|
double |
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.
|
Projection |
getProjection()
Get a projection for converting between screen-pixel coordinates and latitude/longitude
coordinates.
|
MapViewRepository |
getRepository() |
Rect |
getScreenRect(Rect reuse)
Gets the current bounds of the screen in screen coordinates.
|
Scroller |
getScroller() |
MapTileProviderBase |
getTileProvider() |
Handler |
getTileRequestCompleteHandler() |
float |
getTilesScaleFactor() |
static TileSystem |
getTileSystem() |
CustomZoomButtonsController |
getZoomController() |
int |
getZoomLevel()
Deprecated.
|
double |
getZoomLevel(boolean aPending)
Deprecated.
|
double |
getZoomLevelDouble() |
void |
invalidateMapCoordinates(int left,
int top,
int right,
int bottom) |
void |
invalidateMapCoordinates(Rect dirty) |
boolean |
isAnimating()
Determines if maps are animating a zoom operation.
|
boolean |
isFlingEnabled() |
boolean |
isHorizontalMapRepetitionEnabled() |
boolean |
isLayoutOccurred() |
boolean |
isScrollableAreaLimitLatitude() |
boolean |
isScrollableAreaLimitLongitude() |
boolean |
isTilesScaledToDpi() |
boolean |
isVerticalMapRepetitionEnabled() |
protected void |
myOnLayout(boolean changed,
int l,
int t,
int r,
int b)
Code was moved from
onLayout(boolean, int, int, int, int)
in order to avoid Android Studio warnings on direct calls |
void |
onAttachedToWindow() |
void |
onDetach()
destroys the map view, all references to listeners, all overlays, etc
|
protected void |
onDetachedFromWindow() |
boolean |
onKeyDown(int keyCode,
KeyEvent event) |
boolean |
onKeyUp(int keyCode,
KeyEvent event) |
protected void |
onLayout(boolean changed,
int l,
int t,
int r,
int b) |
protected void |
onMeasure(int widthMeasureSpec,
int heightMeasureSpec) |
void |
onPause()
activities/fragments using osmdroid should call this to release resources, pause gps, sensors, timers, etc
|
void |
onResume()
activities/fragments using osmdroid should call this to release resources, pause gps, sensors, timers, etc
|
boolean |
onTouchEvent(MotionEvent event) |
boolean |
onTrackballEvent(MotionEvent event) |
void |
postInvalidateMapCoordinates(int left,
int top,
int right,
int bottom) |
void |
removeMapListener(MapListener mapListener)
Removes a map listener
|
void |
removeOnFirstLayoutListener(MapView.OnFirstLayoutListener listener) |
void |
resetMultiTouchScale() |
void |
resetScrollableAreaLimitLatitude() |
void |
resetScrollableAreaLimitLongitude() |
void |
resetTilesScaleFactor() |
void |
scrollBy(int x,
int y) |
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)
Deprecated.
Use
#getZoomController().setVisibility() instead |
void |
setDestroyMode(boolean pOnDetach) |
void |
setExpectedCenter(IGeoPoint pGeoPoint) |
void |
setExpectedCenter(IGeoPoint pGeoPoint,
long pOffsetX,
long pOffsetY)
Deferred setting of the expected next map center computed by the Projection's constructor,
with no guarantee it will be 100% respected.
|
void |
setFlingEnabled(boolean b) |
void |
setHorizontalMapRepetitionEnabled(boolean horizontalMapRepetitionEnabled)
If horizontalMapRepetition is enabled the map repeats in left/right direction and scrolling wraps around the
edges.
|
void |
setInitCenter(IGeoPoint geoPoint)
Deprecated.
|
(package private) void |
setMapCenter(double aLatitude,
double aLongitude)
Deprecated.
|
(package private) void |
setMapCenter(IGeoPoint aCenter)
Deprecated.
|
(package private) void |
setMapCenter(int aLatitudeE6,
int aLongitudeE6)
Deprecated.
|
void |
setMapCenterOffset(int pMapCenterOffsetX,
int pMapCenterOffsetY) |
void |
setMapListener(MapListener ml)
Deprecated.
|
void |
setMapOrientation(float degrees)
rotates the map to the desired heading
|
void |
setMapOrientation(float degrees,
boolean forceRedraw)
There are some cases when we don't need explicit redraw
|
(package private) void |
setMapScroll(long pMapScrollX,
long pMapScrollY) |
void |
setMaxZoomLevel(Double zoomLevel)
Set the maximum allowed zoom level, or pass null to use the maximum zoom level from the tile
provider.
|
void |
setMinZoomLevel(Double zoomLevel)
Set the minimum allowed zoom level, or pass null to use the minimum zoom level from the tile
provider.
|
void |
setMultiTouchControls(boolean on) |
protected void |
setMultiTouchScale(float pMultiTouchScale) |
protected void |
setMultiTouchScaleCurrentPoint(float pX,
float pY) |
protected void |
setMultiTouchScaleInitPoint(float pX,
float pY) |
void |
setOverlayManager(OverlayManager overlayManager) |
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.
|
protected void |
setProjection(Projection p)
Deprecated.
|
void |
setScrollableAreaLimitDouble(BoundingBox boundingBox)
Set the map to limit it's scrollable view to the specified BoundingBox.
|
void |
setScrollableAreaLimitLatitude(double pNorth,
double pSouth,
int pExtraPixelHeight)
sets the scroll limit
Example:
To block vertical scroll of the view outside north/south poles:
mapView.setScrollableAreaLimitLatitude(MapView.getTileSystem().getMaxLatitude(),
MapView.getTileSystem().getMinLatitude(),
0);
Warning:
Don't use latitude values outside the [MapView.getTileSystem().getMinLatitude(),
MapView.getTileSystem().getMaxLatitude()] range, this would cause an ANR.
|
void |
setScrollableAreaLimitLongitude(double pWest,
double pEast,
int pExtraPixelWidth)
sets the scroll limit
|
void |
setTileProvider(MapTileProviderBase base)
enables you to programmatically set the tile provider (zip, assets, sqlite, etc)
|
void |
setTileSource(ITileSource aTileSource) |
void |
setTilesScaledToDpi(boolean tilesScaledToDpi)
if true, tiles are scaled to the current DPI of the display.
|
void |
setTilesScaleFactor(float pTilesScaleFactor)
Setting an additional scale factor both for ScaledToDpi and standard size
> 1.0 enlarges map display, < 1.0 shrinks map display
|
static void |
setTileSystem(TileSystem pTileSystem) |
void |
setUseDataConnection(boolean aMode)
Set whether to use the network connection if it's available.
|
void |
setVerticalMapRepetitionEnabled(boolean verticalMapRepetitionEnabled)
If verticalMapRepetition is enabled the map repeats in top/bottom direction and scrolling wraps around the
edges.
|
(package private) double |
setZoomLevel(double aZoomLevel) |
void |
setZoomRounding(boolean pZoomRounding) |
protected void |
startAnimation() |
boolean |
useDataConnection()
Whether to use the network connection if it's available.
|
(package private) boolean |
zoomIn()
Deprecated.
|
(package private) boolean |
zoomInFixing(IGeoPoint point)
Deprecated.
|
(package private) boolean |
zoomInFixing(int xPixel,
int yPixel)
Deprecated.
|
(package private) boolean |
zoomOut()
Deprecated.
|
(package private) boolean |
zoomOutFixing(IGeoPoint point)
Deprecated.
|
(package private) boolean |
zoomOutFixing(int xPixel,
int yPixel)
Deprecated.
|
void |
zoomToBoundingBox(BoundingBox boundingBox,
boolean animated)
Zoom the map to enclose the specified bounding box, as closely as possible.
|
void |
zoomToBoundingBox(BoundingBox pBoundingBox,
boolean pAnimated,
int pBorderSizeInPixels) |
double |
zoomToBoundingBox(BoundingBox pBoundingBox,
boolean pAnimated,
int pBorderSizeInPixels,
double pMaximumZoom,
Long pAnimationSpeed) |
addChildrenForAccessibility, addFocusables, addKeyboardNavigationClusters, addStatesFromChildren, addTouchables, addView, addView, addView, addView, addView, addViewInLayout, addViewInLayout, attachLayoutAnimationParameters, attachViewToParent, bringChildToFront, canAnimate, childDrawableStateChanged, childHasTransientStateChanged, cleanupLayoutState, clearChildFocus, clearDisappearingChildren, clearFocus, debug, detachAllViewsFromParent, detachViewFromParent, detachViewFromParent, detachViewsFromParent, dispatchApplyWindowInsets, dispatchCapturedPointerEvent, dispatchConfigurationChanged, dispatchDisplayHint, dispatchDragEvent, dispatchDrawableHotspotChanged, dispatchFreezeSelfOnly, dispatchGenericFocusedEvent, dispatchGenericPointerEvent, dispatchHoverEvent, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchPointerCaptureChanged, dispatchProvideAutofillStructure, dispatchProvideStructure, dispatchRestoreInstanceState, dispatchSaveInstanceState, dispatchSetActivated, dispatchSetPressed, dispatchSetSelected, dispatchSystemUiVisibilityChanged, dispatchThawSelfOnly, dispatchTrackballEvent, dispatchUnhandledMove, dispatchVisibilityChanged, dispatchWindowFocusChanged, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, drawableStateChanged, drawChild, endViewTransition, findFocus, findViewsWithText, focusableViewAvailable, focusSearch, gatherTransparentRegion, getAccessibilityClassName, getChildAt, getChildCount, getChildDrawingOrder, getChildMeasureSpec, getChildStaticTransformation, getChildVisibleRect, getClipChildren, getClipToPadding, getDescendantFocusability, getFocusedChild, getLayoutAnimation, getLayoutAnimationListener, getLayoutMode, getLayoutTransition, getNestedScrollAxes, getOverlay, getPersistentDrawingCache, getTouchscreenBlocksFocus, hasFocus, hasTransientState, indexOfChild, invalidateChild, invalidateChildInParent, isAlwaysDrawnWithCacheEnabled, isAnimationCacheEnabled, isChildrenDrawingOrderEnabled, isChildrenDrawnWithCacheEnabled, isMotionEventSplittingEnabled, isTransitionGroup, jumpDrawablesToCurrentState, layout, measureChild, measureChildren, measureChildWithMargins, notifySubtreeAccessibilityStateChanged, offsetDescendantRectToMyCoords, offsetRectIntoDescendantCoords, onCreateDrawableState, onDescendantInvalidated, onInterceptHoverEvent, onInterceptTouchEvent, onNestedFling, onNestedPreFling, onNestedPrePerformAccessibilityAction, onNestedPreScroll, onNestedScroll, onNestedScrollAccepted, onRequestFocusInDescendants, onRequestSendAccessibilityEvent, onResolvePointerIcon, onStartNestedScroll, onStopNestedScroll, onViewAdded, onViewRemoved, recomputeViewAttributes, removeAllViews, removeAllViewsInLayout, removeDetachedView, removeView, removeViewAt, removeViewInLayout, removeViews, removeViewsInLayout, requestChildFocus, requestChildRectangleOnScreen, requestDisallowInterceptTouchEvent, requestFocus, requestSendAccessibilityEvent, requestTransparentRegion, restoreDefaultFocus, scheduleLayoutAnimation, setAddStatesFromChildren, setAlwaysDrawnWithCacheEnabled, setAnimationCacheEnabled, setChildrenDrawingCacheEnabled, setChildrenDrawingOrderEnabled, setChildrenDrawnWithCacheEnabled, setClipChildren, setClipToPadding, setDescendantFocusability, setLayoutAnimation, setLayoutAnimationListener, setLayoutMode, setLayoutTransition, setMotionEventSplittingEnabled, setOnHierarchyChangeListener, setPersistentDrawingCache, setStaticTransformationsEnabled, setTouchscreenBlocksFocus, setTransitionGroup, shouldDelayChildPressedState, showContextMenuForChild, showContextMenuForChild, startActionModeForChild, startActionModeForChild, startLayoutAnimation, startViewTransition, updateViewLayout
addExtraDataToAccessibilityNodeInfo, addFocusables, addOnAttachStateChangeListener, addOnLayoutChangeListener, animate, announceForAccessibility, autofill, autofill, awakenScrollBars, awakenScrollBars, awakenScrollBars, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, callOnClick, cancelDragAndDrop, cancelLongPress, cancelPendingInputEvents, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, checkInputConnectionProxy, clearAnimation, combineMeasuredStates, computeHorizontalScrollExtent, computeHorizontalScrollOffset, computeHorizontalScrollRange, computeSystemWindowInsets, computeVerticalScrollExtent, computeVerticalScrollOffset, computeVerticalScrollRange, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchFinishTemporaryDetach, dispatchGenericMotionEvent, dispatchNestedFling, dispatchNestedPreFling, dispatchNestedPrePerformAccessibilityAction, dispatchNestedPreScroll, dispatchNestedScroll, dispatchPopulateAccessibilityEvent, dispatchStartTemporaryDetach, draw, drawableHotspotChanged, findViewById, findViewWithTag, fitSystemWindows, focusSearch, forceHasOverlappingRendering, forceLayout, generateViewId, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAccessibilityTraversalAfter, getAccessibilityTraversalBefore, getAlpha, getAnimation, getApplicationWindowToken, getAutofillHints, getAutofillId, getAutofillType, getAutofillValue, getBackground, getBackgroundTintList, getBackgroundTintMode, getBaseline, getBottom, getBottomFadingEdgeStrength, getBottomPaddingOffset, getCameraDistance, getClipBounds, getClipBounds, getClipToOutline, getContentDescription, getContext, getContextMenuInfo, getDefaultFocusHighlightEnabled, getDefaultSize, getDisplay, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getElevation, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusable, getFocusables, getFocusedRect, getForeground, getForegroundGravity, getForegroundTintList, getForegroundTintMode, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHasOverlappingRendering, getHeight, getHitRect, getHorizontalFadingEdgeLength, getHorizontalScrollbarHeight, getId, getImportantForAccessibility, getImportantForAutofill, getKeepScreenOn, getKeyDispatcherState, getLabelFor, getLayerType, getLayoutDirection, getLayoutParams, getLeft, getLeftFadingEdgeStrength, getLeftPaddingOffset, getLocalVisibleRect, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getMinimumHeight, getMinimumWidth, getNextClusterForwardId, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOutlineProvider, getOverScrollMode, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getParent, getParentForAccessibility, getPivotX, getPivotY, getPointerIcon, getResources, getRevealOnFocusHint, getRight, getRightFadingEdgeStrength, getRightPaddingOffset, getRootView, getRootWindowInsets, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollIndicators, getScrollX, getScrollY, getSolidColor, getStateListAnimator, getSuggestedMinimumHeight, getSuggestedMinimumWidth, getSystemUiVisibility, getTag, getTag, getTextAlignment, getTextDirection, getTooltipText, getTop, getTopFadingEdgeStrength, getTopPaddingOffset, getTouchables, getTouchDelegate, getTransitionName, getTranslationX, getTranslationY, getTranslationZ, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarWidth, getViewTreeObserver, getVisibility, getWidth, getWindowAttachCount, getWindowId, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, getZ, hasExplicitFocusable, hasFocusable, hasNestedScrollingParent, hasOnClickListeners, hasOverlappingRendering, hasPointerCapture, hasWindowFocus, inflate, invalidate, invalidate, invalidate, invalidateDrawable, invalidateOutline, isAccessibilityFocused, isActivated, isAttachedToWindow, isClickable, isContextClickable, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isFocusedByDefault, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isImportantForAccessibility, isImportantForAutofill, isInEditMode, isInLayout, isInTouchMode, isKeyboardNavigationCluster, isLaidOut, isLayoutDirectionResolved, isLayoutRequested, isLongClickable, isNestedScrollingEnabled, isOpaque, isPaddingOffsetRequired, isPaddingRelative, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScrollbarFadingEnabled, isScrollContainer, isSelected, isShown, isSoundEffectsEnabled, isTemporarilyDetached, isTextAlignmentResolved, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, keyboardNavigationClusterSearch, measure, mergeDrawableStates, offsetLeftAndRight, offsetTopAndBottom, onAnimationEnd, onAnimationStart, onApplyWindowInsets, onCancelPendingInputEvents, onCapturedPointerEvent, onCheckIsTextEditor, onConfigurationChanged, onCreateContextMenu, onCreateInputConnection, onDisplayHint, onDragEvent, onDraw, onDrawForeground, onDrawScrollBars, onFilterTouchEventForSecurity, onFinishInflate, onFinishTemporaryDetach, onFocusChanged, onGenericMotionEvent, onHoverChanged, onHoverEvent, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onOverScrolled, onPointerCaptureChange, onPopulateAccessibilityEvent, onProvideAutofillStructure, onProvideAutofillVirtualStructure, onProvideStructure, onProvideVirtualStructure, onRestoreInstanceState, onRtlPropertiesChanged, onSaveInstanceState, onScreenStateChanged, onScrollChanged, onSetAlpha, onSizeChanged, onStartTemporaryDetach, onVisibilityAggregated, onVisibilityChanged, onWindowFocusChanged, onWindowSystemUiVisibilityChanged, onWindowVisibilityChanged, overScrollBy, performAccessibilityAction, performClick, performContextClick, performContextClick, performHapticFeedback, performHapticFeedback, performLongClick, performLongClick, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, postInvalidateOnAnimation, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, refreshDrawableState, releasePointerCapture, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, requestApplyInsets, requestFitSystemWindows, requestFocus, requestFocus, requestFocusFromTouch, requestLayout, requestPointerCapture, requestRectangleOnScreen, requestRectangleOnScreen, requestUnbufferedDispatch, resolveSize, resolveSizeAndState, restoreHierarchyState, saveHierarchyState, scheduleDrawable, sendAccessibilityEvent, sendAccessibilityEventUnchecked, setAccessibilityDelegate, setAccessibilityLiveRegion, setAccessibilityTraversalAfter, setAccessibilityTraversalBefore, setActivated, setAlpha, setAnimation, setAutofillHints, setBackground, setBackgroundDrawable, setBackgroundResource, setBackgroundTintList, setBackgroundTintMode, setBottom, setCameraDistance, setClickable, setClipBounds, setClipToOutline, setContentDescription, setContextClickable, setDefaultFocusHighlightEnabled, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setElevation, setEnabled, setFadingEdgeLength, setFilterTouchesWhenObscured, setFitsSystemWindows, setFocusable, setFocusable, setFocusableInTouchMode, setFocusedByDefault, setForeground, setForegroundGravity, setForegroundTintList, setForegroundTintMode, setHapticFeedbackEnabled, setHasTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHovered, setId, setImportantForAccessibility, setImportantForAutofill, setKeepScreenOn, setKeyboardNavigationCluster, setLabelFor, setLayerPaint, setLayerType, setLayoutDirection, setLayoutParams, setLeft, setLongClickable, setMeasuredDimension, setMinimumHeight, setMinimumWidth, setNestedScrollingEnabled, setNextClusterForwardId, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnApplyWindowInsetsListener, setOnCapturedPointerListener, setOnClickListener, setOnContextClickListener, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnScrollChangeListener, setOnSystemUiVisibilityChangeListener, setOnTouchListener, setOutlineProvider, setOverScrollMode, setPadding, setPaddingRelative, setPivotX, setPivotY, setPointerIcon, setPressed, setRevealOnFocusHint, setRight, setRotation, setRotationX, setRotationY, setSaveEnabled, setSaveFromParentEnabled, setScaleX, setScaleY, setScrollBarDefaultDelayBeforeFade, setScrollBarFadeDuration, setScrollbarFadingEnabled, setScrollBarSize, setScrollBarStyle, setScrollContainer, setScrollIndicators, setScrollIndicators, setScrollX, setScrollY, setSelected, setSoundEffectsEnabled, setStateListAnimator, setSystemUiVisibility, setTag, setTag, setTextAlignment, setTextDirection, setTooltipText, setTop, setTouchDelegate, setTransitionName, setTranslationX, setTranslationY, setTranslationZ, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setVisibility, setWillNotCacheDrawing, setWillNotDraw, setX, setY, setZ, showContextMenu, showContextMenu, startActionMode, startActionMode, startAnimation, startDrag, startDragAndDrop, startNestedScroll, stopNestedScroll, toString, unscheduleDrawable, unscheduleDrawable, updateDragShadow, verifyDrawable, willNotCacheDrawing, willNotDraw
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, createContextMenu, getLayoutDirection, getParent, getParentForAccessibility, getTextAlignment, getTextDirection, isLayoutDirectionResolved, isLayoutRequested, isTextAlignmentResolved, isTextDirectionResolved, keyboardNavigationClusterSearch, requestFitSystemWindows, requestLayout
protected Projection mProjection
protected boolean mIsFlinging
protected final AtomicBoolean mIsAnimating
protected Double mMinimumZoomLevel
protected Double mMaximumZoomLevel
final Point mRotateScalePoint
protected List<MapListener> mListners
public MapView(Context context, MapTileProviderBase tileProvider, Handler tileRequestCompleteHandler, AttributeSet attrs)
public MapView(Context context, MapTileProviderBase tileProvider, Handler tileRequestCompleteHandler, AttributeSet attrs, boolean hardwareAccelerated)
public MapView(Context context, AttributeSet attrs)
public MapView(Context context)
public MapView(Context context, MapTileProviderBase aTileProvider)
public MapView(Context context, MapTileProviderBase aTileProvider, 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 void setOverlayManager(OverlayManager overlayManager)
public MapTileProviderBase getTileProvider()
public Scroller getScroller()
public Handler getTileRequestCompleteHandler()
public double getLatitudeSpanDouble()
getLatitudeSpanDouble
in interface IMapView
public double getLongitudeSpanDouble()
getLongitudeSpanDouble
in interface IMapView
public BoundingBox getBoundingBox()
public Rect getScreenRect(Rect reuse)
public Projection getProjection()
getProjection
in interface IMapView
@Deprecated protected void setProjection(Projection p)
resetProjection()
insteadp
- @Deprecated void setMapCenter(IGeoPoint aCenter)
IMapController.animateTo(IGeoPoint)
or IMapController.setCenter(IGeoPoint)
instead@Deprecated void setMapCenter(int aLatitudeE6, int aLongitudeE6)
setMapCenter(IGeoPoint)
@Deprecated void setMapCenter(double aLatitude, double aLongitude)
public boolean isTilesScaledToDpi()
public void setTilesScaledToDpi(boolean tilesScaledToDpi)
tilesScaledToDpi
- public float getTilesScaleFactor()
public void setTilesScaleFactor(float pTilesScaleFactor)
public void resetTilesScaleFactor()
public void setTileSource(ITileSource aTileSource)
double setZoomLevel(double aZoomLevel)
aZoomLevel
- the zoom level bound by the tile source
Used to be an int - is a double since 6.0public void zoomToBoundingBox(BoundingBox boundingBox, boolean animated)
public double zoomToBoundingBox(BoundingBox pBoundingBox, boolean pAnimated, int pBorderSizeInPixels, double pMaximumZoom, Long pAnimationSpeed)
pBoundingBox
- Bounding box we want to zoom to; may be a single GeoPoint
pAnimated
- Animation or immediate action?pBorderSizeInPixels
- Border size around the bounding boxpMaximumZoom
- Maximum zoom we want from bounding box computationpAnimationSpeed
- Animation duration, in millisecondspublic void zoomToBoundingBox(BoundingBox pBoundingBox, boolean pAnimated, int pBorderSizeInPixels)
@Deprecated public int getZoomLevel()
getZoomLevel
in interface IMapView
public double getZoomLevelDouble()
getZoomLevelDouble
in interface IMapView
@Deprecated public double 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 level
Used to be an int - is a double since 6.0public double getMinZoomLevel()
public double getMaxZoomLevel()
getMaxZoomLevel
in interface IMapView
public void setMinZoomLevel(Double zoomLevel)
public void setMaxZoomLevel(Double zoomLevel)
public boolean canZoomIn()
public boolean canZoomOut()
@Deprecated boolean zoomIn()
MapController.zoomIn()
} instead@Deprecated boolean zoomInFixing(IGeoPoint point)
@Deprecated boolean zoomInFixing(int xPixel, int yPixel)
@Deprecated boolean zoomOut()
MapController.zoomOut()
instead@Deprecated boolean zoomOutFixing(IGeoPoint point)
@Deprecated boolean zoomOutFixing(int xPixel, int yPixel)
public IGeoPoint getMapCenter()
Projection.adjustOffsets(org.osmdroid.api.IGeoPoint, android.graphics.PointF)
had to fine-tune
the map center).getMapCenter
in interface IMapView
getExpectedCenter()
public void setMapOrientation(float degrees)
degrees
- public void setMapOrientation(float degrees, boolean forceRedraw)
public float getMapOrientation()
@Deprecated public float getMapScale()
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 setScrollableAreaLimitDouble(BoundingBox boundingBox)
boundingBox
- A lat/long bounding box to limit scrolling to, or null to remove any scrolling
limitationspublic void resetScrollableAreaLimitLatitude()
public void resetScrollableAreaLimitLongitude()
public void setScrollableAreaLimitLatitude(double pNorth, double pSouth, int pExtraPixelHeight)
pNorth
- decimal degrees latitudepSouth
- decimal degrees latitudepExtraPixelHeight
- in pixels, enables scrolling this many pixels past the boundspublic void setScrollableAreaLimitLongitude(double pWest, double pEast, int pExtraPixelWidth)
pWest
- decimal degrees longitudepEast
- decimal degrees longitudepExtraPixelWidth
- in pixels, enables scrolling this many pixels past the boundspublic boolean isScrollableAreaLimitLatitude()
public boolean isScrollableAreaLimitLongitude()
public void invalidateMapCoordinates(Rect dirty)
public void invalidateMapCoordinates(int left, int top, int right, int bottom)
public void postInvalidateMapCoordinates(int left, int top, int right, int bottom)
protected 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 ViewGroup
public ViewGroup.LayoutParams generateLayoutParams(AttributeSet attrs)
generateLayoutParams
in class ViewGroup
protected boolean checkLayoutParams(ViewGroup.LayoutParams p)
checkLayoutParams
in class ViewGroup
protected ViewGroup.LayoutParams generateLayoutParams(ViewGroup.LayoutParams p)
generateLayoutParams
in class ViewGroup
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
protected void onLayout(boolean changed, int l, int t, int r, int b)
protected void myOnLayout(boolean changed, int l, int t, int r, int b)
onLayout(boolean, int, int, int, int)
in order to avoid Android Studio warnings on direct callspublic void addOnFirstLayoutListener(MapView.OnFirstLayoutListener listener)
listener
- public void removeOnFirstLayoutListener(MapView.OnFirstLayoutListener listener)
public boolean isLayoutOccurred()
public void onAttachedToWindow()
onAttachedToWindow
in class ViewGroup
public void onPause()
public void onResume()
public void onDetach()
public boolean onKeyDown(int keyCode, KeyEvent event)
onKeyDown
in interface KeyEvent.Callback
onKeyDown
in class View
public boolean onKeyUp(int keyCode, KeyEvent event)
onKeyUp
in interface KeyEvent.Callback
onKeyUp
in class View
public boolean onTrackballEvent(MotionEvent event)
onTrackballEvent
in class View
public boolean dispatchTouchEvent(MotionEvent event)
dispatchTouchEvent
in class ViewGroup
public boolean onTouchEvent(MotionEvent event)
onTouchEvent
in class View
public void computeScroll()
computeScroll
in class View
public void setBackgroundColor(int pColor)
setBackgroundColor
in interface IMapView
setBackgroundColor
in class View
protected void dispatchDraw(Canvas c)
dispatchDraw
in class ViewGroup
protected void onDetachedFromWindow()
onDetachedFromWindow
in class ViewGroup
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 resetMultiTouchScale()
protected void setMultiTouchScaleInitPoint(float pX, float pY)
protected void setMultiTouchScaleCurrentPoint(float pX, float pY)
protected void setMultiTouchScale(float pMultiTouchScale)
protected void startAnimation()
@Deprecated public void setMapListener(MapListener ml)
public void addMapListener(MapListener mapListener)
mapListener
- public void removeMapListener(MapListener mapListener)
mapListener
- @Deprecated public void setBuiltInZoomControls(boolean on)
#getZoomController().setVisibility()
insteadpublic void setMultiTouchControls(boolean on)
public boolean isHorizontalMapRepetitionEnabled()
public void setHorizontalMapRepetitionEnabled(boolean horizontalMapRepetitionEnabled)
horizontalMapRepetitionEnabled
- public boolean isVerticalMapRepetitionEnabled()
public void setVerticalMapRepetitionEnabled(boolean verticalMapRepetitionEnabled)
verticalMapRepetitionEnabled
- public void setFlingEnabled(boolean b)
public boolean isFlingEnabled()
public void setTileProvider(MapTileProviderBase base)
base
- MapTileProviderBasic
@Deprecated public void setInitCenter(IGeoPoint geoPoint)
public long getMapScrollX()
public long getMapScrollY()
void setMapScroll(long pMapScrollX, long pMapScrollY)
GeoPoint getExpectedCenter()
getMapCenter()
.
This method gives to the Projection the desired map center, typically set by MapView.setExpectedCenter when you want to center a map on a particular point. see issue 868
getMapCenter()
public void setExpectedCenter(IGeoPoint pGeoPoint, long pOffsetX, long pOffsetY)
public void setExpectedCenter(IGeoPoint pGeoPoint)
public void setZoomRounding(boolean pZoomRounding)
public static TileSystem getTileSystem()
public static void setTileSystem(TileSystem pTileSystem)
public MapViewRepository getRepository()
public CustomZoomButtonsController getZoomController()
public TilesOverlay getMapOverlay()
public void setDestroyMode(boolean pOnDetach)
public int getMapCenterOffsetX()
public int getMapCenterOffsetY()
public void setMapCenterOffset(int pMapCenterOffsetX, int pMapCenterOffsetY)