public class MapView
extends android.view.SurfaceView
implements android.view.SurfaceHolder.Callback
Modifier and Type | Class and Description |
---|---|
static class |
MapView.MapMarkerStyle |
android.view.View.AccessibilityDelegate, android.view.View.BaseSavedState, android.view.View.DragShadowBuilder, android.view.View.MeasureSpec, android.view.View.OnApplyWindowInsetsListener, android.view.View.OnAttachStateChangeListener, android.view.View.OnClickListener, android.view.View.OnContextClickListener, 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.OnScrollChangeListener, android.view.View.OnSystemUiVisibilityChangeListener, android.view.View.OnTouchListener
Modifier and Type | Field and Description |
---|---|
protected boolean |
ccpVisible |
protected android.content.Context |
context |
protected DragGestureDetector |
dragDetector |
protected boolean |
halfResolution |
protected float |
halfResolutionFactor |
protected int |
halfResolutionMaxCCPWidth |
protected boolean |
jniCMemOwn |
protected long |
jniCPtr |
android.graphics.Bitmap |
map |
protected boolean |
nativeInitialized |
protected OnInitializeListener |
onInitializeListener |
protected int |
originalHeight |
protected int |
originalWidth |
protected RotateGestureDetector |
rotateDetector |
protected ScaleGestureDetector |
scaleDetector |
protected int |
scaledHeight |
protected int |
scaledWidth |
protected OnScaleGestureListener |
scaleGestureListener |
protected boolean |
surfaceReady |
protected static boolean |
updatable |
ACCESSIBILITY_LIVE_REGION_ASSERTIVE, ACCESSIBILITY_LIVE_REGION_NONE, ACCESSIBILITY_LIVE_REGION_POLITE, 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_NO_HIDE_DESCENDANTS, IMPORTANT_FOR_ACCESSIBILITY_YES, 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, 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_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(android.content.Context context)
Constructor
|
MapView(android.content.Context context,
android.util.AttributeSet attr)
Constructor
|
Modifier and Type | Method and Description |
---|---|
int |
addTrace(boolean beforeRouteTrace,
int polyCount,
PositionArray polyPoints,
Color innerColor,
Color outerColor,
int lineStyle,
int lineWidth)
Add a polyline to the internal rendering data.
|
int |
addTrace(boolean beforeRouteTrace,
Trace trace,
Color innerColor,
Color outerColor,
int lineStyle,
int lineWidth)
Add a polyline to the internal rendering data.
|
static void |
allowUpdates() |
void |
ccpVisible(boolean visible) |
void |
delete()
Kills rubbish if owning the object.
|
static void |
denyUpdates() |
void |
doAutoZoom(NavigationInformation navInfo,
GPSData gpsData,
boolean doSmoothZoom) |
void |
draw(android.graphics.Canvas canvas) |
int |
drawNative(android.graphics.Bitmap bitmap)
Draws the MapView with the given bitmap
|
protected void |
finalize() |
protected void |
finalizeNative()
Finalizes the MapView
|
void |
finish() |
boolean |
get3dMode()
Get whether the map is 3d or 2d mode.
|
int |
getBackgroundColor()
Get the current background color of the mapview
|
protected android.graphics.Bitmap |
getBitmap(int width,
int height) |
int |
getBrightness()
Retrieve the brightness of the MapView.
|
Position |
getCenter()
Gets the center position of the MapView.
|
static long |
getCPtr(MapView obj)
Returns the memory address of the MapView-object in the
native code.
|
Position |
getFixPoint()
Adjust the fix point of the Map view
|
boolean |
getGrayMode()
Gets whether the map should be drawn in grayscale
colors.
|
float |
getHalfResolutionFactor() |
int |
getHalfResolutionMaxCCPWidth() |
Position |
getMapMarkerCenter()
Retrieves the coordinates of the center.
|
boolean |
getMapMarkerNorthernAdjusted()
Returns true, if orientation is ignored and the marker is always directed
towards the top of the map.
|
int |
getMapMarkerOrientation()
Retrieves the orientation of the marker (if suitable).
|
int |
getMapMarkerStyle()
Retrieves the style of the marker.
|
boolean |
getNightMode()
Gets whether the map should be drawn in night mode colors.
|
int |
getOrientation()
Gets the orientation/rotation of the map.
|
boolean |
getRenderHouseNr()
Retrieve the setting, of rendering housenumber in 2d mode.
|
boolean |
getRenderStreetNames()
Retrieve the setting, of house numbers rendering in 2d mode.
|
int |
getScale()
Gets the scale of the current MapView.
|
int |
getScaledHeight() |
int |
getScaledWidth() |
protected void |
initialize(android.content.Context context,
boolean createNative)
Initialization of the mapview.
|
protected void |
initializeGestures() |
protected void |
initializeNative(android.graphics.Bitmap bitmap)
Initializes a MapView with a given bitmap
|
protected void |
initializeNativeWithBitmap(int width,
int height)
Initializes the native part with an bitmap image created in the dimension of the given with and height.
|
boolean |
isHalfResolution() |
static boolean |
isUpdateable() |
protected void |
onInitialized() |
boolean |
onTouchEvent(android.view.MotionEvent event) |
void |
removeOnInitializeListener() |
void |
removeTrace(int traceId)
Remove trace from rendering
|
void |
resume()
Don't forget to call this function in the hosting activtiy
|
void |
set3dMode(boolean is3d)
Sets whether the map is 3d or 2d mode.
|
void |
setAutoMoveMap(boolean automove)
Sets the flag, weather the mapview is in the auto-move-state
or not
|
void |
setBrightness(int brightness)
Sets the brightness of the MapView.
|
void |
setCenter(GeoPosition position)
Sets the center position of the MapView.
|
void |
setCenter(Position position)
Sets the center position of the MapView.
|
void |
setFixPoint(Position relPos)
Adjust the fix point of the Map view.
|
void |
setGrayMode(boolean grayMode)
Sets whether the map should be drawn in grayscale
colors.
|
void |
setHalfResolution(boolean halfResolution,
float halfResolutionFactor,
int halfResolutionMaxCCPWidth) |
void |
setManeuverArrowVisibility(boolean maneuverArrowVisibility2d,
boolean maneuverArrowVisibility3d)
Enables or disables the visibility of the maneuver
arrows - separately in 2d and 3d.
|
void |
setMapDesign(java.io.File file,
boolean isDay) |
void |
setMapMarker(Position mapMarkerCenter,
int mapMarkerOrientation,
boolean mapMarkerNorthernAdjusted,
MapView.MapMarkerStyle mapMarkerStyle)
Position a marker indicating the current position on the map.
|
void |
setNavigationInformation(NavigationInformation navInfo)
Sets the current navigation informations for the
map.
|
void |
setNightMode(boolean nightMode)
Sets whether the map should be drawn in night mode
colors.
|
void |
setOnInitializeListener(OnInitializeListener listener) |
void |
setOrientation(int orientation)
Sets the orientation/rotation of the map.
|
void |
setScale(int scale)
Sets the scale of the current MapView.
|
void |
setScalePosition(Position position)
Sets the scale postion of the current MapView.
|
void |
setStandardTraceParameters(short lineWidth,
int innerColor,
int outerColor,
int traceId)
Adjust the visual appearance of traces.
|
void |
setStyles(boolean renderHouseNr,
boolean renderStreetNames)
Configure some settings about rendering details.
|
void |
surfaceChanged(android.view.SurfaceHolder holder,
int format,
int width,
int height) |
void |
surfaceCreated(android.view.SurfaceHolder arg0) |
void |
surfaceDestroyed(android.view.SurfaceHolder arg0) |
Position |
transformCoordinates(CoordinateSystem sourceFormat,
Position source,
CoordinateSystem destinationFormat)
Transforms coordinates from source format to the specified destination format
|
void |
translateMapByPixelPos(int x1,
int y1,
int x2,
int y2)
Translate the map by the given screen coordinates
|
void |
update() |
void |
zoom2Route()
zoom to the current route trace
|
void |
zoom2Route(int translateX,
int translateY,
int id)
zoom to the current route trace
|
boolean |
zoom2Trace(int traceId,
int translateX,
int translateY)
Calls the zoom to route functionality
|
dispatchDraw, gatherTransparentRegion, getHolder, onAttachedToWindow, onDetachedFromWindow, onMeasure, onWindowVisibilityChanged, setSecure, setVisibility, setZOrderMediaOverlay, setZOrderOnTop
addChildrenForAccessibility, addFocusables, addFocusables, addOnAttachStateChangeListener, addOnLayoutChangeListener, addTouchables, animate, announceForAccessibility, awakenScrollBars, awakenScrollBars, awakenScrollBars, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, callOnClick, cancelLongPress, cancelPendingInputEvents, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, checkInputConnectionProxy, clearAnimation, clearFocus, combineMeasuredStates, computeHorizontalScrollExtent, computeHorizontalScrollOffset, computeHorizontalScrollRange, computeScroll, computeSystemWindowInsets, computeVerticalScrollExtent, computeVerticalScrollOffset, computeVerticalScrollRange, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchApplyWindowInsets, dispatchConfigurationChanged, dispatchDisplayHint, dispatchDragEvent, dispatchDrawableHotspotChanged, dispatchGenericFocusedEvent, dispatchGenericMotionEvent, dispatchGenericPointerEvent, dispatchHoverEvent, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchNestedFling, dispatchNestedPreFling, dispatchNestedPrePerformAccessibilityAction, dispatchNestedPreScroll, dispatchNestedScroll, dispatchPopulateAccessibilityEvent, dispatchProvideStructure, dispatchRestoreInstanceState, dispatchSaveInstanceState, dispatchSetActivated, dispatchSetPressed, dispatchSetSelected, dispatchSystemUiVisibilityChanged, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchVisibilityChanged, dispatchWindowFocusChanged, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, drawableHotspotChanged, drawableStateChanged, findFocus, findViewById, findViewsWithText, findViewWithTag, fitSystemWindows, focusSearch, forceLayout, generateViewId, getAccessibilityClassName, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAccessibilityTraversalAfter, getAccessibilityTraversalBefore, getAlpha, getAnimation, getApplicationWindowToken, getBackground, getBackgroundTintList, getBackgroundTintMode, getBaseline, getBottom, getBottomFadingEdgeStrength, getBottomPaddingOffset, getCameraDistance, getClipBounds, getClipBounds, getClipToOutline, getContentDescription, getContext, getContextMenuInfo, getDefaultSize, getDisplay, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getElevation, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusables, getFocusedRect, getForeground, getForegroundGravity, getForegroundTintList, getForegroundTintMode, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHeight, getHitRect, getHorizontalFadingEdgeLength, getHorizontalScrollbarHeight, getId, getImportantForAccessibility, getKeepScreenOn, getKeyDispatcherState, getLabelFor, getLayerType, getLayoutDirection, getLayoutParams, getLeft, getLeftFadingEdgeStrength, getLeftPaddingOffset, getLocalVisibleRect, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getMinimumHeight, getMinimumWidth, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOutlineProvider, getOverlay, getOverScrollMode, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getParent, getParentForAccessibility, getPivotX, getPivotY, getResources, 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, getTop, getTopFadingEdgeStrength, getTopPaddingOffset, getTouchables, getTouchDelegate, getTransitionName, getTranslationX, getTranslationY, getTranslationZ, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarWidth, getViewTreeObserver, getVisibility, getWidth, getWindowAttachCount, getWindowId, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, getZ, hasFocus, hasFocusable, hasNestedScrollingParent, hasOnClickListeners, hasOverlappingRendering, hasTransientState, hasWindowFocus, inflate, invalidate, invalidate, invalidate, invalidateDrawable, invalidateOutline, isAccessibilityFocused, isActivated, isAttachedToWindow, isClickable, isContextClickable, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isImportantForAccessibility, isInEditMode, isInLayout, isInTouchMode, isLaidOut, isLayoutDirectionResolved, isLayoutRequested, isLongClickable, isNestedScrollingEnabled, isOpaque, isPaddingOffsetRequired, isPaddingRelative, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScrollbarFadingEnabled, isScrollContainer, isSelected, isShown, isSoundEffectsEnabled, isTextAlignmentResolved, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, jumpDrawablesToCurrentState, layout, measure, mergeDrawableStates, offsetLeftAndRight, offsetTopAndBottom, onAnimationEnd, onAnimationStart, onApplyWindowInsets, onCancelPendingInputEvents, onCheckIsTextEditor, onConfigurationChanged, onCreateContextMenu, onCreateDrawableState, onCreateInputConnection, onDisplayHint, onDragEvent, onDraw, onDrawForeground, onDrawScrollBars, onFilterTouchEventForSecurity, onFinishInflate, onFinishTemporaryDetach, onFocusChanged, onGenericMotionEvent, onHoverChanged, onHoverEvent, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onLayout, onOverScrolled, onPopulateAccessibilityEvent, onProvideStructure, onProvideVirtualStructure, onRestoreInstanceState, onRtlPropertiesChanged, onSaveInstanceState, onScreenStateChanged, onScrollChanged, onSetAlpha, onSizeChanged, onStartTemporaryDetach, onTrackballEvent, onVisibilityChanged, onWindowFocusChanged, onWindowSystemUiVisibilityChanged, overScrollBy, performAccessibilityAction, performClick, performContextClick, performHapticFeedback, performHapticFeedback, performLongClick, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, postInvalidateOnAnimation, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, refreshDrawableState, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, requestApplyInsets, requestFitSystemWindows, requestFocus, requestFocus, requestFocus, requestFocusFromTouch, requestLayout, requestRectangleOnScreen, requestRectangleOnScreen, requestUnbufferedDispatch, resolveSize, resolveSizeAndState, restoreHierarchyState, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEvent, sendAccessibilityEventUnchecked, setAccessibilityDelegate, setAccessibilityLiveRegion, setAccessibilityTraversalAfter, setAccessibilityTraversalBefore, setActivated, setAlpha, setAnimation, setBackground, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setBackgroundTintList, setBackgroundTintMode, setBottom, setCameraDistance, setClickable, setClipBounds, setClipToOutline, setContentDescription, setContextClickable, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setElevation, setEnabled, setFadingEdgeLength, setFilterTouchesWhenObscured, setFitsSystemWindows, setFocusable, setFocusableInTouchMode, setForeground, setForegroundGravity, setForegroundTintList, setForegroundTintMode, setHapticFeedbackEnabled, setHasTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHovered, setId, setImportantForAccessibility, setKeepScreenOn, setLabelFor, setLayerPaint, setLayerType, setLayoutDirection, setLayoutParams, setLeft, setLongClickable, setMeasuredDimension, setMinimumHeight, setMinimumWidth, setNestedScrollingEnabled, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnApplyWindowInsetsListener, setOnClickListener, setOnContextClickListener, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnScrollChangeListener, setOnSystemUiVisibilityChangeListener, setOnTouchListener, setOutlineProvider, setOverScrollMode, setPadding, setPaddingRelative, setPivotX, setPivotY, setPressed, 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, setTop, setTouchDelegate, setTransitionName, setTranslationX, setTranslationY, setTranslationZ, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setWillNotCacheDrawing, setWillNotDraw, setX, setY, setZ, showContextMenu, startActionMode, startActionMode, startAnimation, startDrag, startNestedScroll, stopNestedScroll, toString, unscheduleDrawable, unscheduleDrawable, verifyDrawable, willNotCacheDrawing, willNotDraw
protected boolean jniCMemOwn
protected long jniCPtr
protected OnInitializeListener onInitializeListener
public android.graphics.Bitmap map
protected android.content.Context context
protected boolean surfaceReady
protected static boolean updatable
protected boolean nativeInitialized
protected boolean ccpVisible
protected boolean halfResolution
protected float halfResolutionFactor
protected int halfResolutionMaxCCPWidth
protected int originalWidth
protected int originalHeight
protected int scaledWidth
protected int scaledHeight
protected ScaleGestureDetector scaleDetector
protected RotateGestureDetector rotateDetector
protected DragGestureDetector dragDetector
protected OnScaleGestureListener scaleGestureListener
public MapView(android.content.Context context)
context
- - reference to the context.public MapView(android.content.Context context, android.util.AttributeSet attr)
context
- - reference to the context.attr
- - the attibutesprotected void initialize(android.content.Context context, boolean createNative)
context
- - reference to the context.protected void initializeGestures()
public boolean onTouchEvent(android.view.MotionEvent event)
onTouchEvent
in class android.view.View
public void surfaceChanged(android.view.SurfaceHolder holder, int format, int width, int height)
surfaceChanged
in interface android.view.SurfaceHolder.Callback
public void resume()
public void setOnInitializeListener(OnInitializeListener listener)
public void removeOnInitializeListener()
protected android.graphics.Bitmap getBitmap(int width, int height)
protected void initializeNativeWithBitmap(int width, int height)
width
- The with of the bitmap used to draw the map on.height
- The height of the bitmap used to draw the map on.protected void onInitialized()
public void surfaceCreated(android.view.SurfaceHolder arg0)
surfaceCreated
in interface android.view.SurfaceHolder.Callback
public void surfaceDestroyed(android.view.SurfaceHolder arg0)
surfaceDestroyed
in interface android.view.SurfaceHolder.Callback
public void finish()
public static void allowUpdates()
public static void denyUpdates()
public static boolean isUpdateable()
public void update()
public void draw(android.graphics.Canvas canvas)
draw
in class android.view.SurfaceView
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public static long getCPtr(MapView obj)
obj
- - the MapView-object.public void delete()
protected void initializeNative(android.graphics.Bitmap bitmap) throws NavigationRuntimeException
bitmap
- the bitmap to initialize with.NavigationRuntimeException
protected void finalizeNative() throws NavigationRuntimeException
NavigationRuntimeException
public int drawNative(android.graphics.Bitmap bitmap) throws NavigationRuntimeException
bitmap
- the given bitmapNavigationRuntimeException
public Position getFixPoint() throws NavigationRuntimeException
NavigationRuntimeException
public int getMapMarkerStyle() throws NavigationRuntimeException
NavigationRuntimeException
public boolean getMapMarkerNorthernAdjusted() throws NavigationRuntimeException
NavigationRuntimeException
public int getMapMarkerOrientation() throws NavigationRuntimeException
NavigationRuntimeException
public Position getMapMarkerCenter() throws NavigationRuntimeException
NavigationRuntimeException
public int getBrightness() throws NavigationRuntimeException
NavigationRuntimeException
public boolean getRenderHouseNr() throws NavigationRuntimeException
NavigationRuntimeException
public boolean getRenderStreetNames() throws NavigationRuntimeException
NavigationRuntimeException
public boolean get3dMode() throws NavigationRuntimeException
NavigationRuntimeException
public int getBackgroundColor() throws NavigationRuntimeException
NavigationRuntimeException
public Position getCenter() throws NavigationRuntimeException
NavigationRuntimeException
public boolean getGrayMode() throws NavigationRuntimeException
NavigationRuntimeException
public boolean getNightMode() throws NavigationRuntimeException
NavigationRuntimeException
public int getOrientation() throws NavigationRuntimeException
NavigationRuntimeException
public int addTrace(boolean beforeRouteTrace, Trace trace, Color innerColor, Color outerColor, int lineStyle, int lineWidth) throws NavigationRuntimeException
beforeRouteTrace
- if SDK_TRUE polyline will be drawn before route trace
(if any), else afterwards (e.g. on top).innerColor
- Color for the inner of the trace.outerColor
- Color for the onner of the trace.lineStyle
- unsupportedlineWidth
- If >0 it is the absolute size in pixel. For 2d maps that one
is constant all over the output, for 3d it is of course scaled according to
the projection. Negative values are interpreted as an increment by the
absolute, i.e. positive, value on top of the maximum street width.NavigationRuntimeException
public int addTrace(boolean beforeRouteTrace, int polyCount, PositionArray polyPoints, Color innerColor, Color outerColor, int lineStyle, int lineWidth) throws NavigationRuntimeException
beforeRouteTrace
- if SDK_TRUE polyline will be drawn before route trace
(if any), else afterwards (e.g. on top).polyCount
- Number of polygon points.polyPoints
- non-NULL pointer to route trace.innerColor
- Color for the inner of the trace.outerColor
- Color for the onner of the trace.lineStyle
- unsupportedlineWidth
- If >0 it is the absolute size in pixel. For 2d maps that one
is constant all over the output, for 3d it is of course scaled according to
the projection. Negative values are interpreted as an increment by the
absolute, i.e. positive, value on top of the maximum street width.NavigationRuntimeException
public void removeTrace(int traceId) throws NavigationRuntimeException
traceId
- trace id as obtained by addTrace() to be deleted.
Use negative values to remove all traces added via AddTrace() to
the given Mapview.NavigationRuntimeException
public int getScale() throws NavigationRuntimeException
NavigationRuntimeException
public void setStandardTraceParameters(short lineWidth, int innerColor, int outerColor, int traceId) throws NavigationRuntimeException
lineWidth
- the absolute size in pixel. For 2d maps that one is constant
all over the output, for 3d it is of course scaled according to the projection.innerColor
- Color for the inner of the trace.outerColor
- Color for the outer of the trace.traceId
- the value 1 specifies the route trace, greater IDs specify
TMC and/or custom traces. Values lower than 1 are ignored.NavigationRuntimeException
public void setFixPoint(Position relPos) throws NavigationRuntimeException
relPos
- Relative position in percent of the screen pixel width
counting from the center (e.g. to move left[right], use -1[1] to -99[99]).NavigationRuntimeException
public void setMapMarker(Position mapMarkerCenter, int mapMarkerOrientation, boolean mapMarkerNorthernAdjusted, MapView.MapMarkerStyle mapMarkerStyle) throws NavigationRuntimeException
mapMarkerCenter
- The coordinates of the center (Mercator)mapMarkerOrientation
- Defines the orientation of the marker (if suitable).
The valus is given in degree clockwise, 0 represents top.mapMarkerNorthernAdjusted
- if set to true the orientation is ignored and
the marker is always directed towards the top of the map.mapMarkerStyle
- Defines which kind marker is being drawn, see \ref MapMarkerParameters.
Use SDK_mm_None to remove the markerNavigationRuntimeException
public void setManeuverArrowVisibility(boolean maneuverArrowVisibility2d, boolean maneuverArrowVisibility3d) throws NavigationRuntimeException
maneuverArrowVisibility2d
- Sets visibility in 2d modemaneuverArrowVisibility3d
- Sets visibility in 3d modeNavigationRuntimeException
public void setStyles(boolean renderHouseNr, boolean renderStreetNames) throws NavigationRuntimeException
renderHouseNr
- Dis/enable rendering of house numbers in 2d mode. In 3d
they get never rendered.renderStreetNames
- Dis/enable rendering of street names in 2d mode.
In 3d they get never rendered.NavigationRuntimeException
public void setBrightness(int brightness) throws NavigationRuntimeException
brightness
- pBrightness A number between 0
(dark) and 100 (bright, day)NavigationRuntimeException
public void set3dMode(boolean is3d) throws NavigationRuntimeException
is3d
- whether the map is 3d or 2d modeNavigationRuntimeException
public void setCenter(Position position) throws NavigationRuntimeException
position
- the center position of the MapViewNavigationRuntimeException
public void setCenter(GeoPosition position) throws NavigationRuntimeException
position
- the center position of the MapViewNavigationRuntimeException
public void setGrayMode(boolean grayMode) throws NavigationRuntimeException
grayMode
- whether the map should be drawn in grayscale
colorsNavigationRuntimeException
public void setNightMode(boolean nightMode) throws NavigationRuntimeException
nightMode
- whether the map should be drawn in night
mode colorsNavigationRuntimeException
public void setOrientation(int orientation) throws NavigationRuntimeException
orientation
- the orientation/rotation of the mapNavigationRuntimeException
public void setScale(int scale) throws NavigationRuntimeException
scale
- the scale of the current MapView.NavigationRuntimeException
public void setScalePosition(Position position) throws NavigationRuntimeException
position
- the scale position of the current MapView.NavigationRuntimeException
public void translateMapByPixelPos(int x1, int y1, int x2, int y2) throws NavigationRuntimeException
x1
- x coordinatey1
- y coordinatex2
- x coordinatey2
- y coordinateNavigationRuntimeException
public Position transformCoordinates(CoordinateSystem sourceFormat, Position source, CoordinateSystem destinationFormat) throws NavigationRuntimeException
sourceFormat
- The enum value of the source format (see \ref Coordinate).
This can be a pixel value of the actual Mapview or specific coordinates (geodecimal, mercator).source
- X The input coordinate to transform.destinationFormat
- The enum value of the destination format of the transformation.NavigationRuntimeException
public void setNavigationInformation(NavigationInformation navInfo)
navInfo
- the current navigation
informations for the mappublic void zoom2Route()
public void zoom2Route(int translateX, int translateY, int id)
translateX
- translate the map x pixels afterwardstranslateY
- translate the map y pixels afterwardsid
- route idpublic boolean zoom2Trace(int traceId, int translateX, int translateY)
public void ccpVisible(boolean visible)
public void setAutoMoveMap(boolean automove)
automove
- the flagpublic int getScaledWidth()
public int getScaledHeight()
public boolean isHalfResolution()
public float getHalfResolutionFactor()
public int getHalfResolutionMaxCCPWidth()
public void setHalfResolution(boolean halfResolution, float halfResolutionFactor, int halfResolutionMaxCCPWidth)
public void setMapDesign(java.io.File file, boolean isDay)
public void doAutoZoom(NavigationInformation navInfo, GPSData gpsData, boolean doSmoothZoom)