com.supermap.mapping.AR
Class ArControl2
- java.lang.Object
-
- android.view.View
-
- android.view.ViewGroup
-
- android.widget.RelativeLayout
-
- com.supermap.mapping.AR.ArControl2
-
- All Implemented Interfaces:
- android.graphics.drawable.Drawable.Callback, android.view.accessibility.AccessibilityEventSource, android.view.KeyEvent.Callback, android.view.ViewManager, android.view.ViewParent
public class ArControl2 extends android.widget.RelativeLayout
AR Map control
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class android.widget.RelativeLayout
android.widget.RelativeLayout.LayoutParams
-
Nested classes/interfaces inherited from class android.view.ViewGroup
android.view.ViewGroup.MarginLayoutParams, android.view.ViewGroup.OnHierarchyChangeListener
-
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.widget.RelativeLayout
ABOVE, ALIGN_BASELINE, ALIGN_BOTTOM, ALIGN_END, ALIGN_LEFT, ALIGN_PARENT_BOTTOM, ALIGN_PARENT_END, ALIGN_PARENT_LEFT, ALIGN_PARENT_RIGHT, ALIGN_PARENT_START, ALIGN_PARENT_TOP, ALIGN_RIGHT, ALIGN_START, ALIGN_TOP, BELOW, CENTER_HORIZONTAL, CENTER_IN_PARENT, CENTER_VERTICAL, END_OF, LEFT_OF, RIGHT_OF, START_OF, TRUE
-
Fields inherited from class android.view.ViewGroup
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
-
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 ArControl2(android.content.Context context)
The constructor.ArControl2(android.content.Context context, android.util.AttributeSet attrs)
The constructor.ArControl2(android.content.Context context, android.util.AttributeSet attrs, int defStyle)
The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
addMapDrawParams(boolean bShowARDest, float dDeltaAngle, float dPitch, java.lang.String strText, java.lang.String strDistance, float x, float y)
Adds map drawing parametersvoid
beginAR()
Turn on AR map modevoid
calculate_AR_End(int nStartX, int nStartY, double startX, double startY, double endX, double endY, float azimuth, float dPitch, java.lang.String strShowText, java.lang.String strShowDistance)
Calculates the endint point of AR navigationvoid
calulateOrientation(double azimuth)
Calculates the directionvoid
clearMapDrawParams()
Clears map drawing parametersboolean
closeFollowingMode()
Close the tracing modevoid
drawCircleOnTrackingLayer(Point2D point2D, float azimuth, float pitch, float roll)
Drawing circles on a tracing layerandroid.graphics.Bitmap
getARBitmap_Car()
Gets the bit map of AR carsPoint2D
getARCenter()
Gets the center of AR drawingARMode
getARMapType()
Gets AR map typesdouble
getArScale()
Gets AR map scaleboolean
getARState()
Gets AR statusfloat
getCarAngle()
Gets the guiding angle of AR carsjava.lang.String
getDatasetName()
Gets the name of the POI dataset in a AR mapdouble
getDistance(double x1, double y1, double x2, double y2)
Gets the distance between two pointsMapView
getMapView()
Gets MapViewRecordset
getRecordset()
Gets the record setandroid.graphics.Rect
getRect(int nX, int nY)
Gets a rectangle framejava.util.ArrayList<android.graphics.Rect>
getRects()
Gets the rectangular fame collectionjava.lang.String
getTileName()
Returns the title name of POI text in a AR mapboolean
getUIWorking()
Gets whether it is the UI working statusPoint2D
getViewPoint()
Gets the center of viewvoid
hideCamera()
Hide the cameravoid
init(android.content.Context context)
AR map initialization functionboolean
isIntersect(android.graphics.Rect rectFirst, android.graphics.Rect rectSecond)
Determines whether there are intersections between two rectanglesboolean
isRectContain(android.graphics.Rect rect)
Determines whether a rectangle is within another rectangle.boolean
isRectContain(android.graphics.Rect rect, int nStart, int nEnd)
Determines whether a rectangle is includedboolean
IsShowLocation()
Gets whether to display the current positionvoid
openFollowingMode()
Open the tracing modeGeoLine
queryARGeoLine(java.lang.String strDatasetName, int smID)
Search AR geometrical linesjava.lang.String
queryARName(java.lang.String strDatasetName, int smID, java.lang.String strName)
Searches the name relative to spot idvoid
queryARRecordsetData(java.lang.String strQueryName, java.util.ArrayList<java.lang.String> arrName, java.util.ArrayList<java.lang.Double> arrX, java.util.ArrayList<java.lang.Double> arrY)
Searches all data of AR spots including name, x-coordinate, y-coordinatevoid
setARBitmap_Car(android.graphics.Bitmap bitmap)
Sets the bit map of AR carsvoid
setARBitmap(android.graphics.Bitmap bitmap)
Sets the bit mapvoid
setARCenter(Point2D arCenter)
Sets the center of AR drawingvoid
setARMode(ARMode type)
Sets AR map typesvoid
setArScale(double scale)
Sets AR map scalevoid
setARState(boolean arState)
Sets AR statusvoid
setCarAngle(float angle)
Sets the guiding angle of AR carsvoid
setDatasetName(java.lang.String datasetName)
Gets the POI dataset in a AR mapvoid
setMapDrawParams(boolean bShowARDest, float dDeltaAngle, float dPitch, java.lang.String strText, java.lang.String strDistance)
Shows the real information of near modevoid
setRecordset(Recordset recordset)
Sets the record setvoid
setRect(int nIndex, android.graphics.Rect rectNew)
Sets a rectanglevoid
setRect(android.graphics.Rect rect, android.graphics.Rect rectNew)
Updates the current rectanglevoid
setRects(java.util.ArrayList<android.graphics.Rect> arrRect)
Sets the rectangular fame collectionvoid
setShowLocation(boolean showLocation)
Sets whether to display the current positionvoid
setTileName(java.lang.String tileName)
Sets the title name of POI text in a AR mapvoid
setUIWorking(boolean bUIWorking)
Sets the status of UIvoid
setViewPoint(Point2D point)
Sets the center of viewvoid
show_AR_Btn(int x, int y, float dDensity, java.lang.String strName, java.lang.String strDistance, android.widget.Button btnDest, android.widget.Button btnDest_Down)
Shows the spatial position of POI recognized.void
show_AR_End_Layout(boolean bShowLayout, int x, int y, float dDensity, java.lang.String strName, java.lang.String strDistance, android.widget.RelativeLayout rlLayout)
Shows the layout of top of ARvoid
showCamera()
Turn on the cameravoid
showLocation(Point2D point2D, float azimuth)
Displays the current position.void
showMapView(boolean bShow)
Whether to display the map controlvoid
showNearResult_POI(Point2D pnt2DCenter, float azimuth, float pitch, float roll)
Shows the resulting POI of near modevoid
stopAR()
Turn off AR map mode-
Methods inherited from class android.widget.RelativeLayout
dispatchPopulateAccessibilityEvent, generateLayoutParams, getBaseline, getGravity, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, requestLayout, setGravity, setHorizontalGravity, setIgnoreGravity, setVerticalGravity, shouldDelayChildPressedState
-
Methods inherited from class android.view.ViewGroup
addChildrenForAccessibility, addFocusables, addStatesFromChildren, addTouchables, addView, addView, addView, addView, addView, bringChildToFront, childDrawableStateChanged, childHasTransientStateChanged, clearChildFocus, clearDisappearingChildren, clearFocus, dispatchApplyWindowInsets, dispatchConfigurationChanged, dispatchDisplayHint, dispatchDragEvent, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchSetActivated, dispatchSetSelected, dispatchSystemUiVisibilityChanged, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchWindowFocusChanged, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, endViewTransition, findFocus, findViewsWithText, focusableViewAvailable, focusSearch, gatherTransparentRegion, getChildAt, getChildCount, getChildMeasureSpec, getChildVisibleRect, getClipChildren, getDescendantFocusability, getFocusedChild, getLayoutAnimation, getLayoutAnimationListener, getLayoutMode, getLayoutTransition, getOverlay, getPersistentDrawingCache, hasFocus, hasFocusable, hasTransientState, indexOfChild, invalidateChild, invalidateChildInParent, isAlwaysDrawnWithCacheEnabled, isAnimationCacheEnabled, isMotionEventSplittingEnabled, jumpDrawablesToCurrentState, layout, notifySubtreeAccessibilityStateChanged, offsetDescendantRectToMyCoords, offsetRectIntoDescendantCoords, onInterceptHoverEvent, onInterceptTouchEvent, onRequestSendAccessibilityEvent, recomputeViewAttributes, removeAllViews, removeAllViewsInLayout, removeView, removeViewAt, removeViewInLayout, removeViews, removeViewsInLayout, requestChildFocus, requestChildRectangleOnScreen, requestDisallowInterceptTouchEvent, requestFocus, requestSendAccessibilityEvent, requestTransparentRegion, scheduleLayoutAnimation, setAddStatesFromChildren, setAlwaysDrawnWithCacheEnabled, setAnimationCacheEnabled, setClipChildren, setClipToPadding, setDescendantFocusability, setLayoutAnimation, setLayoutAnimationListener, setLayoutMode, setLayoutTransition, setMotionEventSplittingEnabled, setOnHierarchyChangeListener, setPersistentDrawingCache, showContextMenuForChild, startActionModeForChild, startLayoutAnimation, startViewTransition, updateViewLayout
-
Methods inherited from class android.view.View
addFocusables, addOnAttachStateChangeListener, addOnLayoutChangeListener, animate, announceForAccessibility, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, callOnClick, cancelLongPress, cancelPendingInputEvents, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, checkInputConnectionProxy, clearAnimation, combineMeasuredStates, computeScroll, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchGenericMotionEvent, draw, findViewById, findViewWithTag, focusSearch, forceLayout, generateViewId, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAlpha, getAnimation, getApplicationWindowToken, getBackground, 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, 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, hasOnClickListeners, hasOverlappingRendering, 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, measure, offsetLeftAndRight, offsetTopAndBottom, onApplyWindowInsets, onCancelPendingInputEvents, onCheckIsTextEditor, onCreateInputConnection, onDragEvent, onFilterTouchEventForSecurity, onFinishTemporaryDetach, onGenericMotionEvent, onHoverChanged, onHoverEvent, 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, requestFocusFromTouch, 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, setVisibility, setWillNotCacheDrawing, setWillNotDraw, setX, setY, showContextMenu, startActionMode, startAnimation, startDrag, toString, unscheduleDrawable, unscheduleDrawable, willNotCacheDrawing, willNotDraw
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface android.view.ViewParent
canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, createContextMenu, getLayoutDirection, getParent, getParentForAccessibility, getTextAlignment, getTextDirection, isLayoutDirectionResolved, isLayoutRequested, isTextAlignmentResolved, isTextDirectionResolved, requestFitSystemWindows
-
-
-
-
Constructor Detail
-
ArControl2
public ArControl2(android.content.Context context)
The constructor.- Parameters:
context
- The context.
-
ArControl2
public ArControl2(android.content.Context context, android.util.AttributeSet attrs)
The constructor.- Parameters:
context
- The context.attrs
- Attribute sets in the XML node
-
ArControl2
public ArControl2(android.content.Context context, android.util.AttributeSet attrs, int defStyle)
The constructor.- Parameters:
context
- The context.attrs
- Attribute sets in the XML nodedefStyle
- Cutomized style
-
-
Method Detail
-
init
public void init(android.content.Context context)
AR map initialization function- Parameters:
context
- The context.
-
getMapView
public MapView getMapView()
Gets MapView- Returns:
- The current MapView
-
setUIWorking
public void setUIWorking(boolean bUIWorking)
Sets the status of UI- Parameters:
bUIWorking
- the status of UI
-
getUIWorking
public boolean getUIWorking()
Gets whether it is the UI working status- Returns:
- UI status
-
setShowLocation
public void setShowLocation(boolean showLocation)
Sets whether to display the current position- Parameters:
showLocation
- whether to display the current position
-
IsShowLocation
public boolean IsShowLocation()
Gets whether to display the current position
-
beginAR
public void beginAR()
Turn on AR map mode
-
stopAR
public void stopAR()
Turn off AR map mode
-
openFollowingMode
public void openFollowingMode()
Open the tracing mode
-
closeFollowingMode
public boolean closeFollowingMode()
Close the tracing mode- Returns:
- Close the tracing mode
-
hideCamera
public void hideCamera()
Hide the camera
-
showCamera
public void showCamera()
Turn on the camera
-
showMapView
public void showMapView(boolean bShow)
Whether to display the map control- Parameters:
bShow
- Whether to display the map control
-
setARMode
public void setARMode(ARMode type)
Sets AR map types- Parameters:
type
- AR map types
-
getARMapType
public ARMode getARMapType()
Gets AR map types- Returns:
- AR map types
-
getViewPoint
public Point2D getViewPoint()
Gets the center of view- Returns:
- the center of view
-
setViewPoint
public void setViewPoint(Point2D point)
Sets the center of view- Parameters:
point
- the center of view
-
getArScale
public double getArScale()
Gets AR map scale
-
setArScale
public void setArScale(double scale)
Sets AR map scale- Parameters:
scale
- AR map scale
-
setARState
public void setARState(boolean arState)
Sets AR status- Parameters:
arState
- AR status
-
getARState
public boolean getARState()
Gets AR status- Returns:
- AR status
-
setDatasetName
public void setDatasetName(java.lang.String datasetName)
Gets the POI dataset in a AR map- Parameters:
datasetName
- the name of the POI dataset in a AR map
-
getDatasetName
public java.lang.String getDatasetName()
Gets the name of the POI dataset in a AR map- Returns:
- the name of the POI dataset in a AR map
-
setTileName
public void setTileName(java.lang.String tileName)
Sets the title name of POI text in a AR map- Parameters:
tileName
- the title name of POI text in a AR map
-
getTileName
public java.lang.String getTileName()
Returns the title name of POI text in a AR map- Returns:
- the title name of POI text in a AR map
-
setRecordset
public void setRecordset(Recordset recordset)
Sets the record set- Parameters:
recordset
- the name of the record set
-
getRecordset
public Recordset getRecordset()
Gets the record set- Returns:
- the record set
-
setARCenter
public void setARCenter(Point2D arCenter)
Sets the center of AR drawing- Parameters:
arCenter
- the center of AR drawing
-
getARCenter
public Point2D getARCenter()
Gets the center of AR drawing- Returns:
- the center of AR drawing
-
drawCircleOnTrackingLayer
public void drawCircleOnTrackingLayer(Point2D point2D, float azimuth, float pitch, float roll)
Drawing circles on a tracing layer- Parameters:
point2D
- Drawing centerazimuth
- The azimuthpitch
- The pitch angleroll
- the rolling angle
-
showNearResult_POI
public void showNearResult_POI(Point2D pnt2DCenter, float azimuth, float pitch, float roll)
Shows the resulting POI of near mode- Parameters:
pnt2DCenter
- coordinates of the center pointazimuth
- The azimuthpitch
- The pitch angleroll
- the rolling angle
-
calculate_AR_End
public void calculate_AR_End(int nStartX, int nStartY, double startX, double startY, double endX, double endY, float azimuth, float dPitch, java.lang.String strShowText, java.lang.String strShowDistance)
Calculates the endint point of AR navigation- Parameters:
nStartX
- The horizontal coordinate of origin of AR controlnStartY
- The vertical coordinate of origin of AR controlstartX
- The horizontal coordinate of starting pointstartY
- The vertical coordinate of starting pointendX
- The horizontal coordinate of ending pointendY
- The vertical coordinate of ending pointazimuth
- The azimuthdPitch
- the pitch anglestrShowText
- text to be shownstrShowDistance
- distance to be shown
-
show_AR_Btn
public void show_AR_Btn(int x, int y, float dDensity, java.lang.String strName, java.lang.String strDistance, android.widget.Button btnDest, android.widget.Button btnDest_Down)
Shows the spatial position of POI recognized. Overlays on a camera- Parameters:
x
- X coordinate of left border of the rectangley
- Y coordinate of top border of the rectangledDensity
- density of device screenstrName
- Field information to be shownstrDistance
- distance to be shownbtnDest
- Displays buttonbtnDest_Down
- Presses button
-
show_AR_End_Layout
public void show_AR_End_Layout(boolean bShowLayout, int x, int y, float dDensity, java.lang.String strName, java.lang.String strDistance, android.widget.RelativeLayout rlLayout)
Shows the layout of top of AR- Parameters:
bShowLayout
- whether to display the current layoutx
- X coordinate of left border of the rectangley
- Y coordinate of top border of the rectangledDensity
- density of device screenstrName
- Field information to be shownstrDistance
- distance to be shownrlLayout
- The layout handle
-
queryARName
public java.lang.String queryARName(java.lang.String strDatasetName, int smID, java.lang.String strName)
Searches the name relative to spot id- Parameters:
strDatasetName
- dataset name.smID
- Spot IDstrName
- Names of fields of attribute table of a dataset- Returns:
- the name relative to spot id
-
queryARRecordsetData
public void queryARRecordsetData(java.lang.String strQueryName, java.util.ArrayList<java.lang.String> arrName, java.util.ArrayList<java.lang.Double> arrX, java.util.ArrayList<java.lang.Double> arrY)
Searches all data of AR spots including name, x-coordinate, y-coordinate- Parameters:
strQueryName
- Searches all data of AR spotsarrName
- Data namearrX
- X coordinatearrY
- Y coordinate
-
queryARGeoLine
public GeoLine queryARGeoLine(java.lang.String strDatasetName, int smID)
Search AR geometrical lines- Parameters:
strDatasetName
- dataset name.smID
- attribute filter- Returns:
- AR geometrical lines
-
getRect
public android.graphics.Rect getRect(int nX, int nY)
Gets a rectangle frame- Parameters:
nX
- X coordinate of left border of the rectangular framenY
- Y coordinate of top border of the rectangular frame- Returns:
- the rectangular frame
-
setRect
public void setRect(int nIndex, android.graphics.Rect rectNew)
Sets a rectangle- Parameters:
nIndex
- the newly set rectangle indexrectNew
- The rectangle to be set
-
setRect
public void setRect(android.graphics.Rect rect, android.graphics.Rect rectNew)
Updates the current rectangle- Parameters:
rect
- the current rectanglerectNew
- The new rectangle
-
getRects
public java.util.ArrayList<android.graphics.Rect> getRects()
Gets the rectangular fame collection- Returns:
- the rectangular frame collection
-
setRects
public void setRects(java.util.ArrayList<android.graphics.Rect> arrRect)
Sets the rectangular fame collection- Parameters:
arrRect
- the rectangular fame collection to be set
-
isRectContain
public boolean isRectContain(android.graphics.Rect rect, int nStart, int nEnd)
Determines whether a rectangle is included- Parameters:
rect
- the target rectanglenStart
- the start indexnEnd
- the end index- Returns:
- whether a rectangle is within another rectangle.
-
isRectContain
public boolean isRectContain(android.graphics.Rect rect)
Determines whether a rectangle is within another rectangle.- Parameters:
rect
- the target rectangle- Returns:
- whether a rectangle is within another rectangle.
-
getDistance
public double getDistance(double x1, double y1, double x2, double y2)
Gets the distance between two points- Parameters:
x1
- x coordinate of the first pointy1
- y coordinate of the first pointx2
- x coordinate of the second pointy2
- y coordinate of the second point- Returns:
- the distance between two points
-
isIntersect
public boolean isIntersect(android.graphics.Rect rectFirst, android.graphics.Rect rectSecond)
Determines whether there are intersections between two rectangles- Parameters:
rectFirst
- the first rectanglerectSecond
- the second rectangle- Returns:
- whether a rectangle intersects with another rectangle
-
showLocation
public void showLocation(Point2D point2D, float azimuth)
Displays the current position. Positioning on a AR scene- Parameters:
point2D
- the current positionazimuth
- The current azimuth
-
calulateOrientation
public void calulateOrientation(double azimuth)
Calculates the direction- Parameters:
azimuth
- The azimuth
-
setARBitmap
public void setARBitmap(android.graphics.Bitmap bitmap)
Sets the bit map- Parameters:
bitmap
- the bit map of AR cars
-
setARBitmap_Car
public void setARBitmap_Car(android.graphics.Bitmap bitmap)
Sets the bit map of AR cars- Parameters:
bitmap
- the bit map of AR cars
-
getARBitmap_Car
public android.graphics.Bitmap getARBitmap_Car()
Gets the bit map of AR cars- Returns:
- the bit map 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
-
setMapDrawParams
public void setMapDrawParams(boolean bShowARDest, float dDeltaAngle, float dPitch, java.lang.String strText, java.lang.String strDistance)
Shows the real information of near mode- Parameters:
bShowARDest
- whether to display targetsdDeltaAngle
- sets the relative angledPitch
- Sets the pitch anglestrText
- Sets text to nbe displayedstrDistance
- Sets the distance
-
addMapDrawParams
public void addMapDrawParams(boolean bShowARDest, float dDeltaAngle, float dPitch, java.lang.String strText, java.lang.String strDistance, float x, float y)
Adds map drawing parameters- Parameters:
bShowARDest
- whether to display targetsdDeltaAngle
- sets the relative angledPitch
- Sets the pitch anglestrText
- Sets text to nbe displayedstrDistance
- Sets the distancex
- Sets the x coordinatey
- Sets the y coordinate
-
clearMapDrawParams
public void clearMapDrawParams()
Clears map drawing parameters
-
-