com.supermap.mapping.AR

类 ARMapDrawView

  • java.lang.Object
    • android.view.View
      • android.view.SurfaceView
        • com.supermap.mapping.AR.ARMapDrawView
  • 所有已实现的接口:
    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.Callback
    只不过一个是继承的view一个是surfaceview,将AttributeSetattrs加上。 只要处理好谁是顶层的view谁设成透明, 预览视频的surfaceview设成底层,在且要在xml属性文件里设成visible就可以了
    • 嵌套类概要

      • 从类继承的嵌套类/接口 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
    • 字段概要

      • 从类继承的字段 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
    • 构造器概要

      构造器 
      构造器和说明
      ARMapDrawView(android.content.Context context) 
    • 方法概要

      所有方法 实例方法 具体方法 
      限定符和类型 方法和说明
      void addMapDrawParams(boolean bShowARDest, float dDeltaAngle, float dPitch, java.lang.String strText, java.lang.String strDistance, float x, float y)
      添加AR绘制对象
      void clearMapDrawParams()
      清空AR绘制对象
      void drawLine()
      绘制线
      android.graphics.Bitmap getARBitmap_Car()
      获取AR小车的位图
      ArControl2 getARControl()
      获取AR地图的窗体
      float getCarAngle()
      获取AR小车的指引角度
      float getDeltaAngle()
      获取相对角度
      float getPitch()
      获取俯仰角
      boolean getShowARDest()
      获取是否显示AR目标物
      java.lang.String getShowDistance()
      获取显示的距离信息
      java.lang.String getShowText()
      获取显示的文字信息
      void setARBitmap_Car(android.graphics.Bitmap bitmap)
      设置AR小车的位图
      void setARBitmap(android.graphics.Bitmap bitmap)
      设置AR位图
      void setARControl(ArControl2 arControl)
      设置AR地图的窗体
      void setCarAngle(float angle)
      设置AR小车的指引角度
      void setDeltaAngle(float deltaAngle)
      设置相对角度
      void setMapDrawParams2(boolean bShowARDest)
      是否显示目标物
      void setMapDrawParams3(boolean bShowARDest)
      是否显示目标物
      void setMapDrawParams4(boolean bShowARDest)
      是否显示目标物
      void setMapDrawParams5(boolean bShowARDest)
      是否显示目标物
      void setMapDrawParams6(boolean bShowARDest)
      是否显示目标物
      void setMapDrawParams7(boolean bShowARDest)
      是否显示目标物
      void setMapDrawParams8(boolean bShowARDest)
      是否显示目标物
      void setPitch(float pitch)
      设置俯仰角
      void setShowARDest(boolean showARDest)
      设置是否显示AR目标物
      void setShowDistance(java.lang.String strDistance)
      设置显示的距离信息
      void setShowText(java.lang.String strText)
      设置显示的文字信息
      void startMapDrawThread()
      启动AR的绘制线程
      void surfaceChanged(android.view.SurfaceHolder arg0, int arg1, int w, int h)
      重载的SurfaceView surfaceChanged函数
      void surfaceCreated(android.view.SurfaceHolder arg0)
      重载的SurfaceView surfaceChanged函数
      void surfaceDestroyed(android.view.SurfaceHolder arg0)
      重载的SurfaceView surfaceChanged函数
      • 从类继承的方法 android.view.SurfaceView

        draw, gatherTransparentRegion, getHolder, setSecure, setVisibility, setZOrderMediaOverlay, setZOrderOnTop
      • 从类继承的方法 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
      • 从类继承的方法 java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • 构造器详细资料

      • ARMapDrawView

        public ARMapDrawView(android.content.Context context)
        参数:
        context - 上下文
    • 方法详细资料

      • surfaceChanged

        public void surfaceChanged(android.view.SurfaceHolder arg0,
                                   int arg1,
                                   int w,
                                   int h)
        重载的SurfaceView surfaceChanged函数
        指定者:
        surfaceChanged 在接口中 android.view.SurfaceHolder.Callback
      • surfaceCreated

        public void surfaceCreated(android.view.SurfaceHolder arg0)
        重载的SurfaceView surfaceChanged函数
        指定者:
        surfaceCreated 在接口中 android.view.SurfaceHolder.Callback
      • surfaceDestroyed

        public void surfaceDestroyed(android.view.SurfaceHolder arg0)
        重载的SurfaceView surfaceChanged函数
        指定者:
        surfaceDestroyed 在接口中 android.view.SurfaceHolder.Callback
      • drawLine

        public void drawLine()
        绘制线
      • startMapDrawThread

        public void startMapDrawThread()
        启动AR的绘制线程
      • setARControl

        public void setARControl(ArControl2 arControl)
        设置AR地图的窗体
        参数:
        arControl - ArControl2句柄
      • getARControl

        public ArControl2 getARControl()
        获取AR地图的窗体
        返回:
        AR地图窗体
      • setShowARDest

        public void setShowARDest(boolean showARDest)
        设置是否显示AR目标物
        参数:
        showARDest - 是否显示AR目标物
      • getShowARDest

        public boolean getShowARDest()
        获取是否显示AR目标物
        返回:
        是否显示AR目标
      • setDeltaAngle

        public void setDeltaAngle(float deltaAngle)
        设置相对角度
        参数:
        deltaAngle - 相对角度
      • getDeltaAngle

        public float getDeltaAngle()
        获取相对角度
        返回:
        相对角度
      • setPitch

        public void setPitch(float pitch)
        设置俯仰角
        参数:
        pitch - 俯仰角
      • getPitch

        public float getPitch()
        获取俯仰角
        返回:
        俯仰角
      • setShowText

        public void setShowText(java.lang.String strText)
        设置显示的文字信息
        参数:
        strText - 显示的文字信息
      • getShowText

        public java.lang.String getShowText()
        获取显示的文字信息
        返回:
        显示的文字信息
      • setShowDistance

        public void setShowDistance(java.lang.String strDistance)
        设置显示的距离信息
        参数:
        strDistance - 显示的距离信息
      • getShowDistance

        public java.lang.String getShowDistance()
        获取显示的距离信息
        返回:
        显示的距离信息
      • setARBitmap

        public void setARBitmap(android.graphics.Bitmap bitmap)
        设置AR位图
        参数:
        bitmap - 位图
      • setARBitmap_Car

        public void setARBitmap_Car(android.graphics.Bitmap bitmap)
        设置AR小车的位图
        参数:
        bitmap - AR小车的位图
      • getARBitmap_Car

        public android.graphics.Bitmap getARBitmap_Car()
        获取AR小车的位图
        返回:
        AR小车的位图
      • setCarAngle

        public void setCarAngle(float angle)
        设置AR小车的指引角度
        参数:
        angle - AR小车的指引角度
      • getCarAngle

        public float getCarAngle()
        获取AR小车的指引角度
        返回:
        AR小车的指引角度
      • setMapDrawParams2

        public void setMapDrawParams2(boolean bShowARDest)
        是否显示目标物
        参数:
        bShowARDest - 是否显示目标物
      • setMapDrawParams3

        public void setMapDrawParams3(boolean bShowARDest)
        是否显示目标物
        参数:
        bShowARDest - 是否显示目标物
      • setMapDrawParams4

        public void setMapDrawParams4(boolean bShowARDest)
        是否显示目标物
        参数:
        bShowARDest - 是否显示目标物
      • setMapDrawParams5

        public void setMapDrawParams5(boolean bShowARDest)
        是否显示目标物
        参数:
        bShowARDest - 是否显示目标物
      • setMapDrawParams6

        public void setMapDrawParams6(boolean bShowARDest)
        是否显示目标物
        参数:
        bShowARDest - 是否显示目标物
      • setMapDrawParams7

        public void setMapDrawParams7(boolean bShowARDest)
        是否显示目标物
        参数:
        bShowARDest - 是否显示目标物
      • setMapDrawParams8

        public void setMapDrawParams8(boolean bShowARDest)
        是否显示目标物
        参数:
        bShowARDest - 是否显示目标物
      • addMapDrawParams

        public void addMapDrawParams(boolean bShowARDest,
                                     float dDeltaAngle,
                                     float dPitch,
                                     java.lang.String strText,
                                     java.lang.String strDistance,
                                     float x,
                                     float y)
        添加AR绘制对象
        参数:
        bShowARDest - 是否显示AR绘制对象
        dDeltaAngle - 相对角度
        dPitch - 俯仰角
        strText - 要显示的文字信息
        strDistance - 要显示的距离信息
        x - 横坐标
        y - 纵坐标
      • clearMapDrawParams

        public void clearMapDrawParams()
        清空AR绘制对象