com.supermap.mapping.AR
Class ARMapDrawView
- java.lang.Object
-
- android.view.View
-
- android.view.SurfaceView
-
- com.supermap.mapping.AR.ARMapDrawView
-
- All Implemented Interfaces:
- android.graphics.drawable.Drawable.Callback, android.view.accessibility.AccessibilityEventSource, android.view.KeyEvent.Callback, android.view.SurfaceHolder.Callback
public class ARMapDrawView extends android.view.SurfaceView implements android.view.SurfaceHolder.CallbackOne inherits from view and another one inherits from surfaceview. Adds AttributeSetattrs. Sets one is the top view and another one is transparent, surfaceview to preview videos is set to the bottom layer, and in the xml attribute file, sets it to visible.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class android.view.View
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.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
-
-
Field Summary
-
Fields inherited from class android.view.View
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, 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, 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, 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, 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_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_INHERIT, TEXT_DIRECTION_LOCALE, TEXT_DIRECTION_LTR, TEXT_DIRECTION_RTL, TRANSLATION_X, TRANSLATION_Y, VISIBLE, X, Y
-
-
Constructor Summary
Constructors Constructor and Description ARMapDrawView(android.content.Context context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddMapDrawParams(boolean bShowARDest, float dDeltaAngle, float dPitch, java.lang.String strText, java.lang.String strDistance, float x, float y)Adds AR drawing objectsvoidclearMapDrawParams()Clears AR drawing objectsvoiddrawLine()Draws linesandroid.graphics.BitmapgetARBitmap_Car()Gets the bitmap of AR carsArControl2getARControl()Gets the AR map formfloatgetCarAngle()Gets the guiding angle of AR carsfloatgetDeltaAngle()Gets the relative anglefloatgetPitch()Gets the pitch anglebooleangetShowARDest()Gets whether to show AR target featuresjava.lang.StringgetShowDistance()Gets the distance to showjava.lang.StringgetShowText()Sets text to displayvoidsetARBitmap_Car(android.graphics.Bitmap bitmap)Sets the bitmap of AR carsvoidsetARBitmap(android.graphics.Bitmap bitmap)Sets the AR bitmapvoidsetARControl(ArControl2 arControl)Sets the AR map formvoidsetCarAngle(float angle)Sets the guiding angle of AR carsvoidsetDeltaAngle(float deltaAngle)Sets the relative anglevoidsetMapDrawParams2(boolean bShowARDest)Whether to show the target featurevoidsetMapDrawParams3(boolean bShowARDest)Whether to show the target featurevoidsetMapDrawParams4(boolean bShowARDest)Whether to show the target featurevoidsetMapDrawParams5(boolean bShowARDest)Whether to show the target featurevoidsetMapDrawParams6(boolean bShowARDest)Whether to show the target featurevoidsetMapDrawParams7(boolean bShowARDest)Whether to show the target featurevoidsetMapDrawParams8(boolean bShowARDest)Whether to show the target featurevoidsetPitch(float pitch)Sets the pitch anglevoidsetShowARDest(boolean showARDest)Sets whether to show AR target featuresvoidsetShowDistance(java.lang.String strDistance)Sets the distance to showvoidsetShowText(java.lang.String strText)Sets text to displayvoidstartMapDrawThread()Starts the AR drawing threadvoidsurfaceChanged(android.view.SurfaceHolder arg0, int arg1, int w, int h)Reloaded SurfaceView surfaceChanged functionvoidsurfaceCreated(android.view.SurfaceHolder arg0)Reloaded SurfaceView surfaceChanged functionvoidsurfaceDestroyed(android.view.SurfaceHolder arg0)Reloaded SurfaceView surfaceChanged function-
Methods inherited from class android.view.SurfaceView
draw, gatherTransparentRegion, getHolder, setSecure, setVisibility, setZOrderMediaOverlay, setZOrderOnTop
-
Methods inherited from class android.view.View
addChildrenForAccessibility, addFocusables, addFocusables, addOnAttachStateChangeListener, addOnLayoutChangeListener, addTouchables, animate, announceForAccessibility, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, callOnClick, cancelLongPress, cancelPendingInputEvents, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, checkInputConnectionProxy, clearAnimation, clearFocus, combineMeasuredStates, computeScroll, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchApplyWindowInsets, dispatchConfigurationChanged, dispatchDisplayHint, dispatchDragEvent, dispatchGenericMotionEvent, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchPopulateAccessibilityEvent, dispatchSystemUiVisibilityChanged, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchWindowFocusChanged, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, findFocus, findViewById, findViewsWithText, findViewWithTag, focusSearch, forceLayout, generateViewId, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAlpha, getAnimation, getApplicationWindowToken, getBackground, getBaseline, getBottom, getCameraDistance, getClipBounds, getContentDescription, getContext, getDefaultSize, getDisplay, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusables, getFocusedRect, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHeight, getHitRect, getHorizontalFadingEdgeLength, getId, getImportantForAccessibility, getKeepScreenOn, getKeyDispatcherState, getLabelFor, getLayerType, getLayoutDirection, getLayoutParams, getLeft, getLocalVisibleRect, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getMinimumHeight, getMinimumWidth, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOverlay, getOverScrollMode, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getParent, getParentForAccessibility, getPivotX, getPivotY, getResources, getRight, getRootView, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollX, getScrollY, getSolidColor, getSystemUiVisibility, getTag, getTag, getTextAlignment, getTextDirection, getTop, getTouchables, getTouchDelegate, getTranslationX, getTranslationY, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarWidth, getViewTreeObserver, getVisibility, getWidth, getWindowId, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, hasFocus, hasFocusable, hasOnClickListeners, hasOverlappingRendering, hasTransientState, hasWindowFocus, inflate, invalidate, invalidate, invalidate, invalidateDrawable, isActivated, isAttachedToWindow, isClickable, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isInEditMode, isInLayout, isInTouchMode, isLaidOut, isLayoutDirectionResolved, isLayoutRequested, isLongClickable, isOpaque, isPaddingRelative, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScrollbarFadingEnabled, isScrollContainer, isSelected, isShown, isSoundEffectsEnabled, isTextAlignmentResolved, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, jumpDrawablesToCurrentState, layout, measure, offsetLeftAndRight, offsetTopAndBottom, onApplyWindowInsets, onCancelPendingInputEvents, onCheckIsTextEditor, onCreateInputConnection, onDragEvent, onFilterTouchEventForSecurity, onFinishTemporaryDetach, onGenericMotionEvent, onHoverChanged, onHoverEvent, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onPopulateAccessibilityEvent, onRtlPropertiesChanged, onScreenStateChanged, onStartTemporaryDetach, onTouchEvent, onTrackballEvent, onWindowFocusChanged, onWindowSystemUiVisibilityChanged, performAccessibilityAction, performClick, 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, resolveSize, resolveSizeAndState, restoreHierarchyState, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEvent, sendAccessibilityEventUnchecked, setAccessibilityDelegate, setAccessibilityLiveRegion, setActivated, setAlpha, setAnimation, setBackground, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setBottom, setCameraDistance, setClickable, setClipBounds, setContentDescription, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setEnabled, setFadingEdgeLength, setFilterTouchesWhenObscured, setFitsSystemWindows, setFocusable, setFocusableInTouchMode, setHapticFeedbackEnabled, setHasTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHovered, setId, setImportantForAccessibility, setKeepScreenOn, setLabelFor, setLayerPaint, setLayerType, setLayoutDirection, setLayoutParams, setLeft, setLongClickable, setMinimumHeight, setMinimumWidth, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnApplyWindowInsetsListener, setOnClickListener, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnSystemUiVisibilityChangeListener, setOnTouchListener, setOverScrollMode, setPadding, setPaddingRelative, setPivotX, setPivotY, setPressed, setRight, setRotation, setRotationX, setRotationY, setSaveEnabled, setSaveFromParentEnabled, setScaleX, setScaleY, setScrollBarDefaultDelayBeforeFade, setScrollBarFadeDuration, setScrollbarFadingEnabled, setScrollBarSize, setScrollBarStyle, setScrollContainer, setScrollX, setScrollY, setSelected, setSoundEffectsEnabled, setSystemUiVisibility, setTag, setTag, setTextAlignment, setTextDirection, setTop, setTouchDelegate, setTranslationX, setTranslationY, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setWillNotCacheDrawing, setWillNotDraw, setX, setY, showContextMenu, startActionMode, startAnimation, startDrag, toString, unscheduleDrawable, unscheduleDrawable, willNotCacheDrawing, willNotDraw
-
-
-
-
Constructor Detail
-
ARMapDrawView
public ARMapDrawView(android.content.Context context)
- Parameters:
context- The context.
-
-
Method Detail
-
surfaceChanged
public void surfaceChanged(android.view.SurfaceHolder arg0, int arg1, int w, int h)Reloaded SurfaceView surfaceChanged function- Specified by:
surfaceChangedin interfaceandroid.view.SurfaceHolder.Callback
-
surfaceCreated
public void surfaceCreated(android.view.SurfaceHolder arg0)
Reloaded SurfaceView surfaceChanged function- Specified by:
surfaceCreatedin interfaceandroid.view.SurfaceHolder.Callback
-
surfaceDestroyed
public void surfaceDestroyed(android.view.SurfaceHolder arg0)
Reloaded SurfaceView surfaceChanged function- Specified by:
surfaceDestroyedin interfaceandroid.view.SurfaceHolder.Callback
-
drawLine
public void drawLine()
Draws lines
-
startMapDrawThread
public void startMapDrawThread()
Starts the AR drawing thread
-
setARControl
public void setARControl(ArControl2 arControl)
Sets the AR map form- Parameters:
arControl- ArControl2 handle
-
getARControl
public ArControl2 getARControl()
Gets the AR map form- Returns:
- AR map form
-
setShowARDest
public void setShowARDest(boolean showARDest)
Sets whether to show AR target features- Parameters:
showARDest- whether to show the AR target features
-
getShowARDest
public boolean getShowARDest()
Gets whether to show AR target features- Returns:
- Whether to show the AR target
-
setDeltaAngle
public void setDeltaAngle(float deltaAngle)
Sets the relative angle- Parameters:
deltaAngle- sets the relative angle
-
getDeltaAngle
public float getDeltaAngle()
Gets the relative angle- Returns:
- the relative angle
-
setPitch
public void setPitch(float pitch)
Sets the pitch angle- Parameters:
pitch- the pitch angle
-
getPitch
public float getPitch()
Gets the pitch angle- Returns:
- the pitch angle
-
setShowText
public void setShowText(java.lang.String strText)
Sets text to display- Parameters:
strText- text to display
-
getShowText
public java.lang.String getShowText()
Sets text to display- Returns:
- text to display
-
setShowDistance
public void setShowDistance(java.lang.String strDistance)
Sets the distance to show- Parameters:
strDistance- distance information to show
-
getShowDistance
public java.lang.String getShowDistance()
Gets the distance to show- Returns:
- displayed distance
-
setARBitmap
public void setARBitmap(android.graphics.Bitmap bitmap)
Sets the AR bitmap- Parameters:
bitmap- legend bitmap.
-
setARBitmap_Car
public void setARBitmap_Car(android.graphics.Bitmap bitmap)
Sets the bitmap of AR cars- Parameters:
bitmap- the bit map of AR cars
-
getARBitmap_Car
public android.graphics.Bitmap getARBitmap_Car()
Gets the bitmap of AR cars- Returns:
- the bitmap of AR cars
-
setCarAngle
public void setCarAngle(float angle)
Sets the guiding angle of AR cars- Parameters:
angle- the guiding angle of AR cars
-
getCarAngle
public float getCarAngle()
Gets the guiding angle of AR cars- Returns:
- the guiding angle of AR cars
-
setMapDrawParams2
public void setMapDrawParams2(boolean bShowARDest)
Whether to show the target feature- Parameters:
bShowARDest- whether to show the target features
-
setMapDrawParams3
public void setMapDrawParams3(boolean bShowARDest)
Whether to show the target feature- Parameters:
bShowARDest- whether to show the target features
-
setMapDrawParams4
public void setMapDrawParams4(boolean bShowARDest)
Whether to show the target feature- Parameters:
bShowARDest- whether to show the target features
-
setMapDrawParams5
public void setMapDrawParams5(boolean bShowARDest)
Whether to show the target feature- Parameters:
bShowARDest- whether to show the target features
-
setMapDrawParams6
public void setMapDrawParams6(boolean bShowARDest)
Whether to show the target feature- Parameters:
bShowARDest- whether to show the target features
-
setMapDrawParams7
public void setMapDrawParams7(boolean bShowARDest)
Whether to show the target feature- Parameters:
bShowARDest- whether to show the target features
-
setMapDrawParams8
public void setMapDrawParams8(boolean bShowARDest)
Whether to show the target feature- Parameters:
bShowARDest- whether to show the target features
-
addMapDrawParams
public void addMapDrawParams(boolean bShowARDest, float dDeltaAngle, float dPitch, java.lang.String strText, java.lang.String strDistance, float x, float y)Adds AR drawing objects- Parameters:
bShowARDest- Whether to show AR drawing objectsdDeltaAngle- the relative angledPitch- the pitchstrText- text to showstrDistance- distance information to showx- the horizontal coordinatey- the vertical coordinate
-
clearMapDrawParams
public void clearMapDrawParams()
Clears AR drawing objects
-
-