-
- All Implemented Interfaces:
-
android.graphics.drawable.Drawable.Callback,android.view.KeyEvent.Callback,android.view.ViewManager,android.view.ViewParent,android.view.accessibility.AccessibilityEventSource,androidx.lifecycle.LifecycleObserver,com.telenav.map.api.MapView
public class TnMapView extends LinearLayout implements MapView, LifecycleObserver
Mapview is our primary class to show Map and Navigation information on the map. Beside the basic map/traffic functionality, there are: * Annotation Rendering, which can be used to show point of interest on map * Vehicle rendering and follow Vehicle Camera * Copyright reserved by telenav 2020.
-
-
Field Summary
Fields Modifier and Type Field Description public floatdensityDPIpublic floatdefaultDpipublic final static intHORIZONTALpublic final static intSHOW_DIVIDER_BEGINNINGpublic final static intSHOW_DIVIDER_ENDpublic final static intSHOW_DIVIDER_MIDDLEpublic final static intSHOW_DIVIDER_NONEpublic final static intVERTICALpublic final static inteFeatureCategory_Nonepublic final static inteFeatureCategory_RoadFeaturespublic final static inteFeatureCategory_RoadGeometrypublic final static inteFeatureCategory_MapFeaturespublic final static inteFeatureCategory_MapFeaturesGeometrypublic final static inteFeatureCategory_TrafficFeaturespublic final static inteFeatureCategory_TrafficGeometrypublic final static inteFeatureCategory_CustomGeometrypublic final static inteFeatureCategory_TerrainGeometrypublic final static inteFeatureCategory_LandmarkGeometrypublic final static inteFeatureCategory_Allpublic final static inteFeatureCategory_Vitalpublic final static intFOCUS_AFTER_DESCENDANTSpublic final static intFOCUS_BEFORE_DESCENDANTSpublic final static intFOCUS_BLOCK_DESCENDANTSpublic final static intLAYOUT_MODE_CLIP_BOUNDSpublic final static intLAYOUT_MODE_OPTICAL_BOUNDSpublic final static intPERSISTENT_ALL_CACHESpublic final static intPERSISTENT_ANIMATION_CACHEpublic final static intPERSISTENT_NO_CACHEpublic final static intPERSISTENT_SCROLLING_CACHEpublic final static intACCESSIBILITY_LIVE_REGION_ASSERTIVEpublic final static intACCESSIBILITY_LIVE_REGION_NONEpublic final static intACCESSIBILITY_LIVE_REGION_POLITEpublic final static Property<View, Float>ALPHApublic final static intAUTOFILL_FLAG_INCLUDE_NOT_IMPORTANT_VIEWSpublic final static StringAUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DATEpublic final static StringAUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DAYpublic final static StringAUTOFILL_HINT_CREDIT_CARD_EXPIRATION_MONTHpublic final static StringAUTOFILL_HINT_CREDIT_CARD_EXPIRATION_YEARpublic final static StringAUTOFILL_HINT_CREDIT_CARD_NUMBERpublic final static StringAUTOFILL_HINT_CREDIT_CARD_SECURITY_CODEpublic final static StringAUTOFILL_HINT_EMAIL_ADDRESSpublic final static StringAUTOFILL_HINT_NAMEpublic final static StringAUTOFILL_HINT_PASSWORDpublic final static StringAUTOFILL_HINT_PHONEpublic final static StringAUTOFILL_HINT_POSTAL_ADDRESSpublic final static StringAUTOFILL_HINT_POSTAL_CODEpublic final static StringAUTOFILL_HINT_USERNAMEpublic final static intAUTOFILL_TYPE_DATEpublic final static intAUTOFILL_TYPE_LISTpublic final static intAUTOFILL_TYPE_NONEpublic final static intAUTOFILL_TYPE_TEXTpublic final static intAUTOFILL_TYPE_TOGGLEpublic final static intDRAG_FLAG_GLOBALpublic final static intDRAG_FLAG_GLOBAL_PERSISTABLE_URI_PERMISSIONpublic final static intDRAG_FLAG_GLOBAL_PREFIX_URI_PERMISSIONpublic final static intDRAG_FLAG_GLOBAL_URI_READpublic final static intDRAG_FLAG_GLOBAL_URI_WRITEpublic final static intDRAG_FLAG_OPAQUEpublic final static intDRAWING_CACHE_QUALITY_AUTOpublic final static intDRAWING_CACHE_QUALITY_HIGHpublic final static intDRAWING_CACHE_QUALITY_LOWpublic final static intFIND_VIEWS_WITH_CONTENT_DESCRIPTIONpublic final static intFIND_VIEWS_WITH_TEXTpublic final static intFOCUSABLEpublic final static intFOCUSABLES_ALLpublic final static intFOCUSABLES_TOUCH_MODEpublic final static intFOCUSABLE_AUTOpublic final static intFOCUS_BACKWARDpublic final static intFOCUS_DOWNpublic final static intFOCUS_FORWARDpublic final static intFOCUS_LEFTpublic final static intFOCUS_RIGHTpublic final static intFOCUS_UPpublic final static intGONEpublic final static intHAPTIC_FEEDBACK_ENABLEDpublic final static intIMPORTANT_FOR_ACCESSIBILITY_AUTOpublic final static intIMPORTANT_FOR_ACCESSIBILITY_NOpublic final static intIMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTSpublic final static intIMPORTANT_FOR_ACCESSIBILITY_YESpublic final static intIMPORTANT_FOR_AUTOFILL_AUTOpublic final static intIMPORTANT_FOR_AUTOFILL_NOpublic final static intIMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTSpublic final static intIMPORTANT_FOR_AUTOFILL_YESpublic final static intIMPORTANT_FOR_AUTOFILL_YES_EXCLUDE_DESCENDANTSpublic final static intIMPORTANT_FOR_CONTENT_CAPTURE_AUTOpublic final static intIMPORTANT_FOR_CONTENT_CAPTURE_NOpublic final static intIMPORTANT_FOR_CONTENT_CAPTURE_NO_EXCLUDE_DESCENDANTSpublic final static intIMPORTANT_FOR_CONTENT_CAPTURE_YESpublic final static intIMPORTANT_FOR_CONTENT_CAPTURE_YES_EXCLUDE_DESCENDANTSpublic final static intINVISIBLEpublic final static intKEEP_SCREEN_ONpublic final static intLAYER_TYPE_HARDWAREpublic final static intLAYER_TYPE_NONEpublic final static intLAYER_TYPE_SOFTWAREpublic final static intLAYOUT_DIRECTION_INHERITpublic final static intLAYOUT_DIRECTION_LOCALEpublic final static intLAYOUT_DIRECTION_LTRpublic final static intLAYOUT_DIRECTION_RTLpublic final static intMEASURED_HEIGHT_STATE_SHIFTpublic final static intMEASURED_SIZE_MASKpublic final static intMEASURED_STATE_MASKpublic final static intMEASURED_STATE_TOO_SMALLpublic final static intNOT_FOCUSABLEpublic final static intNO_IDpublic final static intOVER_SCROLL_ALWAYSpublic final static intOVER_SCROLL_IF_CONTENT_SCROLLSpublic final static intOVER_SCROLL_NEVERpublic final static Property<View, Float>ROTATIONpublic final static Property<View, Float>ROTATION_Xpublic final static Property<View, Float>ROTATION_Ypublic final static Property<View, Float>SCALE_Xpublic final static Property<View, Float>SCALE_Ypublic final static intSCREEN_STATE_OFFpublic final static intSCREEN_STATE_ONpublic final static intSCROLLBARS_INSIDE_INSETpublic final static intSCROLLBARS_INSIDE_OVERLAYpublic final static intSCROLLBARS_OUTSIDE_INSETpublic final static intSCROLLBARS_OUTSIDE_OVERLAYpublic final static intSCROLLBAR_POSITION_DEFAULTpublic final static intSCROLLBAR_POSITION_LEFTpublic final static intSCROLLBAR_POSITION_RIGHTpublic final static intSCROLL_AXIS_HORIZONTALpublic final static intSCROLL_AXIS_NONEpublic final static intSCROLL_AXIS_VERTICALpublic final static intSCROLL_CAPTURE_HINT_AUTOpublic final static intSCROLL_CAPTURE_HINT_EXCLUDEpublic final static intSCROLL_CAPTURE_HINT_EXCLUDE_DESCENDANTSpublic final static intSCROLL_CAPTURE_HINT_INCLUDEpublic final static intSCROLL_INDICATOR_BOTTOMpublic final static intSCROLL_INDICATOR_ENDpublic final static intSCROLL_INDICATOR_LEFTpublic final static intSCROLL_INDICATOR_RIGHTpublic final static intSCROLL_INDICATOR_STARTpublic final static intSCROLL_INDICATOR_TOPpublic final static intSOUND_EFFECTS_ENABLEDpublic final static intSTATUS_BAR_HIDDENpublic final static intSTATUS_BAR_VISIBLEpublic final static intSYSTEM_UI_FLAG_FULLSCREENpublic final static intSYSTEM_UI_FLAG_HIDE_NAVIGATIONpublic final static intSYSTEM_UI_FLAG_IMMERSIVEpublic final static intSYSTEM_UI_FLAG_IMMERSIVE_STICKYpublic final static intSYSTEM_UI_FLAG_LAYOUT_FULLSCREENpublic final static intSYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATIONpublic final static intSYSTEM_UI_FLAG_LAYOUT_STABLEpublic final static intSYSTEM_UI_FLAG_LIGHT_NAVIGATION_BARpublic final static intSYSTEM_UI_FLAG_LIGHT_STATUS_BARpublic final static intSYSTEM_UI_FLAG_LOW_PROFILEpublic final static intSYSTEM_UI_FLAG_VISIBLEpublic final static intSYSTEM_UI_LAYOUT_FLAGSpublic final static intTEXT_ALIGNMENT_CENTERpublic final static intTEXT_ALIGNMENT_GRAVITYpublic final static intTEXT_ALIGNMENT_INHERITpublic final static intTEXT_ALIGNMENT_TEXT_ENDpublic final static intTEXT_ALIGNMENT_TEXT_STARTpublic final static intTEXT_ALIGNMENT_VIEW_ENDpublic final static intTEXT_ALIGNMENT_VIEW_STARTpublic final static intTEXT_DIRECTION_ANY_RTLpublic final static intTEXT_DIRECTION_FIRST_STRONGpublic final static intTEXT_DIRECTION_FIRST_STRONG_LTRpublic final static intTEXT_DIRECTION_FIRST_STRONG_RTLpublic final static intTEXT_DIRECTION_INHERITpublic final static intTEXT_DIRECTION_LOCALEpublic final static intTEXT_DIRECTION_LTRpublic final static intTEXT_DIRECTION_RTLpublic final static Property<View, Float>TRANSLATION_Xpublic final static Property<View, Float>TRANSLATION_Ypublic final static Property<View, Float>TRANSLATION_Zpublic final static intVISIBLEpublic final static Property<View, Float>Xpublic final static Property<View, Float>Ypublic final static Property<View, Float>Z
-
Constructor Summary
Constructors Constructor Description TnMapView(Context context)TnMapView(Context context, AttributeSet attrs)TnMapView(Context context, AttributeSet attrs, int defStyleAttr)
-
Method Summary
Modifier and Type Method Description floatgetDensityDPI()floatgetDefaultDpi()voidinitialize(@NonNull() MapViewInitConfig config)Provide all important components to initialize the map and engine stuff. MapSubViewcreateSubView(@NonNull() SubViewInitParams config)"Create a subview, add it to the map, and return it. booleanisFinishedLoading(int featureCategoryMask)Check the engine initialization status for specified features voidsetOnCurrentRenderModeChangedListener(@Nullable() CurrentRenderModeChangeListener currentRenderModeChangeListener)* sets the listener for the current rendering mode changes(between 2D and 3D) voidsetOnTargetRenderModeChangedListener(@Nullable() TargetRenderModeChangeListener targetRenderModeChangedListener)* sets the listener for the target rendering mode changes(between 2D and 3D) voidremoveSubView(TnMapSubView subView)voidonPause()Lifecycle hooks, call from owning fragment or activity voidonResume()Lifecycle hooks, call from owning fragment or activity voiddisposeMapview()voidsetFPS(int fps)Set the preferred frames-per-second for the MapView renderer. voidsetActiveGestures(@Nullable() Set<GestureType> activeGestures)* Set active gestures for the view. voidsetOnTouchListener(@NonNull() TouchListener listener)Register touch event callback voidsetOnAnnotationTouchListener(@Nullable() AnnotationTouchListener listener)Register annotation touch event callback voidsetOnPOITouchListener(@Nullable() POITouchListener poiTouchListener)Register POI touch event callback voidsetOnRouteTouchListener(@Nullable() RouteTouchListener listener)Register route touch event callback voidsetOnViewTouchListener(@Nullable() ViewTouchListener listener)Register the touch listener voidsetOnMapElementTouchListener(@Nullable() MapElementTouchListener listener)Register map element touch event callback voidaddMapViewListener(@NonNull() MapView.MapViewListener listener)Register the mapView listener voidremoveMapViewListener(@NonNull() MapView.MapViewListener listener)Remove the mapView listener voidsetFrameThrottlingEnabled(boolean enabled)Enable or disable FPS throttling. VehicleControllervehicleController()* This method is used to return the object used to manipulate the vehicle representation for the MapView VehicleController RoutesControllerroutesController()* This method is used to return the object used to manipulate routes for the MapView RoutesController AnnotationsControllerannotationsController()* The is method is used to return the object used to manipulate annotations for the MapView AnnotationsController CameraControllercameraController()* This method is used to return the object used to manipulate the point of focus for the MapView CameraController FeaturesControllerfeaturesController()* This method is used to return the object used to manipulate renderable features for the MapView FeaturesController ShapesControllershapesController()This method is used to return the object used to manipulate API-fed shape data for rendering on the MapView ShapesController ThemeControllerthemeController()* This method is used to return the object used to manipulate the MapView theme ThemeController LayoutControllerlayoutController()* This method is used to return the object used to manipulate the layout of the MapView LayoutController SearchControllersearchController()* This method is used to return the object used to show POI on MapView SearchController TnFrameThrottlingControllergetFrameThrottlingController()Return instance of a TnFrameThrottlingController, which controls FPS reduction when map is idle. MapDiagnosismapDiagnosis()This method is used to return the object used to diagnose MapView voidgenerateSnapshot(@NonNull() MapView.SnapshotReadyCallback callback)* Generate a bitmap image of the MapView voidgenerateOffscreenSnapshot(@NonNull() OffscreenSnapshotInitParams config)Generate a screenshot offscreen of another area of the map NOTE: Only call from the parent MapView, not from children MapSubViews. -
Methods inherited from class android.widget.LinearLayout
generateLayoutParams, getAccessibilityClassName, getBaseline, getBaselineAlignedChildIndex, getDividerDrawable, getDividerPadding, getGravity, getOrientation, getShowDividers, getWeightSum, isBaselineAligned, isMeasureWithLargestChildEnabled, onRtlPropertiesChanged, setBaselineAligned, setBaselineAlignedChildIndex, setDividerDrawable, setDividerPadding, setGravity, setHorizontalGravity, setMeasureWithLargestChildEnabled, setOrientation, setShowDividers, setVerticalGravity, setWeightSum, shouldDelayChildPressedState -
Methods inherited from class android.view.ViewGroup
addChildrenForAccessibility, addExtraDataToAccessibilityNodeInfo, addFocusables, addKeyboardNavigationClusters, addStatesFromChildren, addTouchables, addView, bringChildToFront, childDrawableStateChanged, childHasTransientStateChanged, clearChildFocus, clearDisappearingChildren, clearFocus, dispatchApplyWindowInsets, dispatchCapturedPointerEvent, dispatchConfigurationChanged, dispatchCreateViewTranslationRequest, dispatchDisplayHint, dispatchDragEvent, dispatchDrawableHotspotChanged, dispatchFinishTemporaryDetach, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchPointerCaptureChanged, dispatchProvideAutofillStructure, dispatchProvideStructure, dispatchScrollCaptureSearch, dispatchSetActivated, dispatchSetSelected, dispatchStartTemporaryDetach, dispatchSystemUiVisibilityChanged, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchWindowFocusChanged, dispatchWindowInsetsAnimationEnd, dispatchWindowInsetsAnimationPrepare, dispatchWindowInsetsAnimationProgress, dispatchWindowInsetsAnimationStart, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, endViewTransition, findFocus, findViewsWithText, focusSearch, focusableViewAvailable, gatherTransparentRegion, getChildAt, getChildCount, getChildMeasureSpec, getChildVisibleRect, getClipChildren, getClipToPadding, getDescendantFocusability, getFocusedChild, getLayoutAnimation, getLayoutAnimationListener, getLayoutMode, getLayoutTransition, getNestedScrollAxes, getOverlay, getPersistentDrawingCache, getTouchscreenBlocksFocus, hasFocus, hasTransientState, indexOfChild, invalidateChild, invalidateChildInParent, isAlwaysDrawnWithCacheEnabled, isAnimationCacheEnabled, isLayoutSuppressed, isMotionEventSplittingEnabled, isTransitionGroup, jumpDrawablesToCurrentState, layout, notifySubtreeAccessibilityStateChanged, offsetDescendantRectToMyCoords, offsetRectIntoDescendantCoords, onDescendantInvalidated, onInterceptHoverEvent, onInterceptTouchEvent, onNestedFling, onNestedPreFling, onNestedPrePerformAccessibilityAction, onNestedPreScroll, onNestedScroll, onNestedScrollAccepted, onRequestSendAccessibilityEvent, onResolvePointerIcon, onStartNestedScroll, onStopNestedScroll, onViewAdded, onViewRemoved, recomputeViewAttributes, removeAllViews, removeAllViewsInLayout, removeView, removeViewAt, removeViewInLayout, removeViews, removeViewsInLayout, requestChildFocus, requestChildRectangleOnScreen, requestDisallowInterceptTouchEvent, requestFocus, requestSendAccessibilityEvent, requestTransparentRegion, restoreDefaultFocus, scheduleLayoutAnimation, setAddStatesFromChildren, setAlwaysDrawnWithCacheEnabled, setAnimationCacheEnabled, setClipChildren, setClipToPadding, setDescendantFocusability, setLayoutAnimation, setLayoutAnimationListener, setLayoutMode, setLayoutTransition, setMotionEventSplittingEnabled, setOnHierarchyChangeListener, setPersistentDrawingCache, setTouchscreenBlocksFocus, setTransitionGroup, setWindowInsetsAnimationCallback, showContextMenuForChild, startActionModeForChild, startLayoutAnimation, startViewTransition, suppressLayout, updateViewLayout -
Methods inherited from class android.view.View
addOnAttachStateChangeListener, addOnLayoutChangeListener, addOnUnhandledKeyEventListener, animate, announceForAccessibility, autofill, bringToFront, buildDrawingCache, buildLayer, callOnClick, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, cancelDragAndDrop, cancelLongPress, cancelPendingInputEvents, checkInputConnectionProxy, clearAnimation, clearViewTranslationCallback, combineMeasuredStates, computeScroll, computeSystemWindowInsets, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchGenericMotionEvent, dispatchNestedFling, dispatchNestedPreFling, dispatchNestedPrePerformAccessibilityAction, dispatchNestedPreScroll, dispatchNestedScroll, dispatchPopulateAccessibilityEvent, draw, drawableHotspotChanged, findViewById, findViewWithTag, forceHasOverlappingRendering, forceLayout, generateDisplayHash, generateViewId, getAccessibilityDelegate, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAccessibilityPaneTitle, getAccessibilityTraversalAfter, getAccessibilityTraversalBefore, getAlpha, getAnimation, getAnimationMatrix, getApplicationWindowToken, getAttributeResolutionStack, getAttributeSourceResourceMap, getAutofillHints, getAutofillId, getAutofillType, getAutofillValue, getBackground, getBackgroundTintBlendMode, getBackgroundTintList, getBackgroundTintMode, getBottom, getCameraDistance, getClipBounds, getClipBounds, getClipToOutline, getContentCaptureSession, getContentDescription, getContext, getDefaultFocusHighlightEnabled, getDefaultSize, getDisplay, getDrawableState, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getElevation, getExplicitStyle, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusable, getFocusables, getFocusedRect, getForeground, getForegroundGravity, getForegroundTintBlendMode, getForegroundTintList, getForegroundTintMode, getGlobalVisibleRect, getHandler, getHasOverlappingRendering, getHeight, getHitRect, getHorizontalFadingEdgeLength, getHorizontalScrollbarThumbDrawable, getHorizontalScrollbarTrackDrawable, getId, getImportantForAccessibility, getImportantForAutofill, getImportantForContentCapture, getKeepScreenOn, getKeyDispatcherState, getLabelFor, getLayerType, getLayoutDirection, getLayoutParams, getLeft, getLocalVisibleRect, getLocationInSurface, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getMinimumHeight, getMinimumWidth, getNextClusterForwardId, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOutlineAmbientShadowColor, getOutlineProvider, getOutlineSpotShadowColor, getOverScrollMode, getOverlay, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getParent, getParentForAccessibility, getPivotX, getPivotY, getPointerIcon, getReceiveContentMimeTypes, getResources, getRevealOnFocusHint, getRight, getRootSurfaceControl, getRootView, getRootWindowInsets, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollCaptureHint, getScrollIndicators, getScrollX, getScrollY, getSolidColor, getSourceLayoutResId, getStateDescription, getStateListAnimator, getSystemGestureExclusionRects, getSystemUiVisibility, getTag, getTextAlignment, getTextDirection, getTooltipText, getTop, getTouchDelegate, getTouchables, getTransitionAlpha, getTransitionName, getTranslationX, getTranslationY, getTranslationZ, getUniqueDrawingId, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarThumbDrawable, getVerticalScrollbarTrackDrawable, getVerticalScrollbarWidth, getViewTranslationResponse, getViewTreeObserver, getVisibility, getWidth, getWindowId, getWindowInsetsController, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, getZ, hasExplicitFocusable, hasFocusable, hasNestedScrollingParent, hasOnClickListeners, hasOnLongClickListeners, hasOverlappingRendering, hasPointerCapture, hasWindowFocus, inflate, invalidate, invalidateDrawable, invalidateOutline, isAccessibilityFocused, isAccessibilityHeading, isActivated, isAttachedToWindow, isClickable, isContextClickable, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isFocusedByDefault, isForceDarkAllowed, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isImportantForAccessibility, isImportantForAutofill, isImportantForContentCapture, isInEditMode, isInLayout, isInTouchMode, isKeyboardNavigationCluster, isLaidOut, isLayoutDirectionResolved, isLayoutRequested, isLongClickable, isNestedScrollingEnabled, isOpaque, isPaddingRelative, isPivotSet, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScreenReaderFocusable, isScrollContainer, isScrollbarFadingEnabled, isSelected, isShowingLayoutBounds, isShown, isSoundEffectsEnabled, isTemporarilyDetached, isTextAlignmentResolved, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, isVisibleToUserForAutofill, keyboardNavigationClusterSearch, measure, offsetLeftAndRight, offsetTopAndBottom, onApplyWindowInsets, onCancelPendingInputEvents, onCapturedPointerEvent, onCheckIsTextEditor, onCreateInputConnection, onCreateViewTranslationRequest, onCreateVirtualViewTranslationRequests, onDragEvent, onDrawForeground, onFilterTouchEventForSecurity, onFinishTemporaryDetach, onGenericMotionEvent, onHoverChanged, onHoverEvent, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onPointerCaptureChange, onPopulateAccessibilityEvent, onProvideAutofillStructure, onProvideAutofillVirtualStructure, onProvideContentCaptureStructure, onProvideStructure, onProvideVirtualStructure, onReceiveContent, onScreenStateChanged, onScrollCaptureSearch, onStartTemporaryDetach, onTouchEvent, onTrackballEvent, onViewTranslationResponse, onVirtualViewTranslationResponses, onVisibilityAggregated, onWindowFocusChanged, onWindowSystemUiVisibilityChanged, performAccessibilityAction, performClick, performContextClick, performHapticFeedback, performLongClick, performReceiveContent, playSoundEffect, post, postDelayed, postInvalidate, postInvalidateDelayed, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, refreshDrawableState, releasePointerCapture, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, removeOnUnhandledKeyEventListener, requestApplyInsets, requestFitSystemWindows, requestFocusFromTouch, requestLayout, requestPointerCapture, requestRectangleOnScreen, requestUnbufferedDispatch, requireViewById, resetPivot, resolveSize, resolveSizeAndState, restoreHierarchyState, saveAttributeDataForStyleable, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEvent, sendAccessibilityEventUnchecked, setAccessibilityDelegate, setAccessibilityHeading, setAccessibilityLiveRegion, setAccessibilityPaneTitle, setAccessibilityTraversalAfter, setAccessibilityTraversalBefore, setActivated, setAllowClickWhenDisabled, setAlpha, setAnimation, setAnimationMatrix, setAutofillHints, setAutofillId, setBackground, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setBackgroundTintBlendMode, setBackgroundTintList, setBackgroundTintMode, setBottom, setCameraDistance, setClickable, setClipBounds, setClipToOutline, setContentCaptureSession, setContentDescription, setContextClickable, setDefaultFocusHighlightEnabled, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setElevation, setEnabled, setFadingEdgeLength, setFilterTouchesWhenObscured, setFitsSystemWindows, setFocusable, setFocusableInTouchMode, setFocusedByDefault, setForceDarkAllowed, setForeground, setForegroundGravity, setForegroundTintBlendMode, setForegroundTintList, setForegroundTintMode, setHapticFeedbackEnabled, setHasTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHorizontalScrollbarThumbDrawable, setHorizontalScrollbarTrackDrawable, setHovered, setId, setImportantForAccessibility, setImportantForAutofill, setImportantForContentCapture, setKeepScreenOn, setKeyboardNavigationCluster, setLabelFor, setLayerPaint, setLayerType, setLayoutDirection, setLayoutParams, setLeft, setLeftTopRightBottom, setLongClickable, setMinimumHeight, setMinimumWidth, setNestedScrollingEnabled, setNextClusterForwardId, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnApplyWindowInsetsListener, setOnCapturedPointerListener, setOnClickListener, setOnContextClickListener, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnReceiveContentListener, setOnScrollChangeListener, setOnSystemUiVisibilityChangeListener, setOnTouchListener, setOutlineAmbientShadowColor, setOutlineProvider, setOutlineSpotShadowColor, setOverScrollMode, setPadding, setPaddingRelative, setPivotX, setPivotY, setPointerIcon, setPressed, setRenderEffect, setRevealOnFocusHint, setRight, setRotation, setRotationX, setRotationY, setSaveEnabled, setSaveFromParentEnabled, setScaleX, setScaleY, setScreenReaderFocusable, setScrollBarDefaultDelayBeforeFade, setScrollBarFadeDuration, setScrollBarSize, setScrollBarStyle, setScrollCaptureCallback, setScrollCaptureHint, setScrollContainer, setScrollIndicators, setScrollX, setScrollY, setScrollbarFadingEnabled, setSelected, setSoundEffectsEnabled, setStateDescription, setStateListAnimator, setSystemGestureExclusionRects, setSystemUiVisibility, setTag, setTextAlignment, setTextDirection, setTooltipText, setTop, setTouchDelegate, setTransitionAlpha, setTransitionName, setTransitionVisibility, setTranslationX, setTranslationY, setTranslationZ, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setVerticalScrollbarThumbDrawable, setVerticalScrollbarTrackDrawable, setViewTranslationCallback, setVisibility, setWillNotCacheDrawing, setWillNotDraw, setX, setY, setZ, showContextMenu, startActionMode, startAnimation, startDrag, startDragAndDrop, startNestedScroll, stopNestedScroll, toString, transformMatrixToGlobal, transformMatrixToLocal, unscheduleDrawable, updateDragShadow, willNotCacheDrawing, willNotDraw -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
TnMapView
TnMapView(Context context)
-
TnMapView
TnMapView(Context context, AttributeSet attrs)
-
TnMapView
TnMapView(Context context, AttributeSet attrs, int defStyleAttr)
-
-
Method Detail
-
getDensityDPI
float getDensityDPI()
-
getDefaultDpi
float getDefaultDpi()
-
initialize
@MainThread() void initialize(@NonNull() MapViewInitConfig config)
Provide all important components to initialize the map and engine stuff.
- Parameters:
config- is a data class that holds the context, dpi, default location, and ready listener for a `MapView`.
-
createSubView
@Nullable() MapSubView createSubView(@NonNull() SubViewInitParams config)
"Create a subview, add it to the map, and return it."
The first thing we do is check that the width and height are greater than zero. If they are not, we return null
- Parameters:
config- SubViewInitConfig
-
isFinishedLoading
boolean isFinishedLoading(int featureCategoryMask)
Check the engine initialization status for specified features
- Parameters:
featureCategoryMask- represents the features of the render engine that are required to be loaded(features are describe above)
-
setOnCurrentRenderModeChangedListener
void setOnCurrentRenderModeChangedListener(@Nullable() CurrentRenderModeChangeListener currentRenderModeChangeListener)
* sets the listener for the current rendering mode changes(between 2D and 3D)
- Parameters:
currentRenderModeChangeListener- the listener that will be used to notify the change
-
setOnTargetRenderModeChangedListener
void setOnTargetRenderModeChangedListener(@Nullable() TargetRenderModeChangeListener targetRenderModeChangedListener)
* sets the listener for the target rendering mode changes(between 2D and 3D)
- Parameters:
targetRenderModeChangedListener- the listener that will be used to notify the change
-
removeSubView
void removeSubView(TnMapSubView subView)
-
onPause
void onPause()
Lifecycle hooks, call from owning fragment or activity
-
onResume
void onResume()
Lifecycle hooks, call from owning fragment or activity
-
disposeMapview
void disposeMapview()
-
setFPS
void setFPS(int fps)
Set the preferred frames-per-second for the MapView renderer. Current default is 30fps
- Parameters:
fps- the preferred frames-per-second
-
setActiveGestures
void setActiveGestures(@Nullable() Set<GestureType> activeGestures)
* Set active gestures for the view. An empty or null list will turn off all gestures.
- Parameters:
activeGestures- the gestures that will be active on the view
-
setOnTouchListener
void setOnTouchListener(@NonNull() TouchListener listener)
Register touch event callback
- Parameters:
listener- The press event listener TouchListener
-
setOnAnnotationTouchListener
void setOnAnnotationTouchListener(@Nullable() AnnotationTouchListener listener)
Register annotation touch event callback
- Parameters:
listener- The annotation press event listener AnnotationTouchListener
-
setOnPOITouchListener
void setOnPOITouchListener(@Nullable() POITouchListener poiTouchListener)
Register POI touch event callback
- Parameters:
poiTouchListener- The POI press event listener POITouchListener
-
setOnRouteTouchListener
void setOnRouteTouchListener(@Nullable() RouteTouchListener listener)
Register route touch event callback
- Parameters:
listener- The route press event listener RouteTouchListener
-
setOnViewTouchListener
void setOnViewTouchListener(@Nullable() ViewTouchListener listener)
Register the touch listener
- Parameters:
listener- The touch listener ViewTouchListener
-
setOnMapElementTouchListener
void setOnMapElementTouchListener(@Nullable() MapElementTouchListener listener)
Register map element touch event callback
- Parameters:
listener- The map element press event listener MapElementTouchListener
-
addMapViewListener
void addMapViewListener(@NonNull() MapView.MapViewListener listener)
Register the mapView listener
- Parameters:
listener- The mapView listener MapViewListener
-
removeMapViewListener
void removeMapViewListener(@NonNull() MapView.MapViewListener listener)
Remove the mapView listener
- Parameters:
listener- The mapView listener MapViewListener
-
setFrameThrottlingEnabled
void setFrameThrottlingEnabled(boolean enabled)
Enable or disable FPS throttling.
- Parameters:
enabled- pass [true] to enable FPS idling when map is inactive pass [false] to run at full speed
-
vehicleController
VehicleController vehicleController()
* This method is used to return the object used to manipulate the vehicle representation for the MapView VehicleController
-
routesController
RoutesController routesController()
* This method is used to return the object used to manipulate routes for the MapView RoutesController
-
annotationsController
AnnotationsController annotationsController()
* The is method is used to return the object used to manipulate annotations for the MapView AnnotationsController
-
cameraController
CameraController cameraController()
* This method is used to return the object used to manipulate the point of focus for the MapView CameraController
-
featuresController
FeaturesController featuresController()
* This method is used to return the object used to manipulate renderable features for the MapView FeaturesController
-
shapesController
ShapesController shapesController()
This method is used to return the object used to manipulate API-fed shape data for rendering on the MapView ShapesController
-
themeController
ThemeController themeController()
* This method is used to return the object used to manipulate the MapView theme ThemeController
-
layoutController
LayoutController layoutController()
* This method is used to return the object used to manipulate the layout of the MapView LayoutController
-
searchController
SearchController searchController()
* This method is used to return the object used to show POI on MapView SearchController
-
getFrameThrottlingController
TnFrameThrottlingController getFrameThrottlingController()
Return instance of a TnFrameThrottlingController, which controls FPS reduction when map is idle.
-
mapDiagnosis
MapDiagnosis mapDiagnosis()
This method is used to return the object used to diagnose MapView
-
generateSnapshot
void generateSnapshot(@NonNull() MapView.SnapshotReadyCallback callback)
* Generate a bitmap image of the MapView
- Parameters:
callback- callback to receive bitmap
-
generateOffscreenSnapshot
void generateOffscreenSnapshot(@NonNull() OffscreenSnapshotInitParams config)
Generate a screenshot offscreen of another area of the map
NOTE: Only call from the parent MapView, not from children MapSubViews. Calling from a MapSubView will result in a no-op and null MapSubView returned
NOTE: The client is not responsible for closing out the resulting MapSubView, it is only returned for styling purposes if the client has passed in a readyListener
- Parameters:
config- OffscreenSnapshotInitConfig config object to prepare subview for creating
-
-
-
-