-
- All Implemented Interfaces:
-
androidx.car.app.SurfaceCallback
,com.telenav.map.api.MapView
public final class TnAAOSMapView implements MapView, SurfaceCallback
Implementation of a MapView for Android Automotive OS.
Usage - todo
Copyright reserved by Telenav 2022.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
TnAAOSMapView.Companion
-
Constructor Summary
Constructors Constructor Description TnAAOSMapView(Context context, AAOSMapViewInitParams mapViewInitParams)
TnAAOSMapView(Context context)
-
Method Summary
Modifier and Type Method Description final Context
getContext()
Unit
onSurfaceAvailable(SurfaceContainer surfaceContainer)
Unit
onSurfaceDestroyed(SurfaceContainer surfaceContainer)
Unit
onStableAreaChanged(Rect stableArea)
Unit
onVisibleAreaChanged(Rect visibleArea)
Unit
onClick(Float x, Float y)
Unit
onFling(Float velocityX, Float velocityY)
Unit
onScale(Float focusX, Float focusY, Float scaleFactor)
Unit
onScroll(Float distanceX, Float distanceY)
Unit
initialize(MapViewInitConfig config)
Provide all important components to initialize the map and engine stuff. MapSubView
createSubView(SubViewInitParams config)
This function creates a subview of the map. Boolean
isFinishedLoading(Integer featureCategoryMask)
Method to check if the map has finished loading the specified feature categories Unit
setOnCurrentRenderModeChangedListener(CurrentRenderModeChangeListener currentRenderModeChangeListener)
sets the listener for the current rendering mode changes(between 2D and 3D) Unit
setOnTargetRenderModeChangedListener(TargetRenderModeChangeListener targetRenderModeChangedListener)
sets the listener for the target rendering mode changes(between 2D and 3D) Unit
onPause()
Lifecycle hooks, call from owning Session Unit
onResume()
Lifecycle hooks, call from owning Session Unit
setFPS(Integer fps)
Set the preferred frames-per-second for the MapView renderer. Boolean
setActiveGestures(Set<GestureType> activeGestures)
Set active gestures for the view. Unit
setOnTouchListener(TouchListener listener)
Register touch event callback Unit
setOnViewTouchListener(ViewTouchListener listener)
It sets the listener for the touch events on the map. Unit
setOnAnnotationTouchListener(AnnotationTouchListener listener)
Sets the listener for annotation touch events. Unit
setOnRouteTouchListener(RouteTouchListener listener)
Sets a listener for the route touch event. Unit
setOnPOITouchListener(POITouchListener poiTouchListener)
Register POI touch event callback Unit
setOnMapElementTouchListener(MapElementTouchListener listener)
Register map element touch event callback Unit
setOnStreetParkingTouchListener(OnStreetParkingTouchListener listener)
register the on-street parking touch listener Unit
addMapViewListener(MapView.MapViewListener listener)
Register the mapView listener Unit
removeMapViewListener(MapView.MapViewListener listener)
Remove the mapView listener VehicleController
getVehicleController()
This method is used to return the object used to manipulate the vehicle representation for the MapView VehicleController RoutesController
getRoutesController()
This method is used to return the object used to manipulate routes for the MapView RoutesController AnnotationsController
getAnnotationsController()
The is method is used to return the object used to manipulate annotations for the MapView AnnotationsController CameraController
getCameraController()
This method is used to return the object used to manipulate the point of focus for the MapView CameraController FeaturesController
getFeaturesController()
This method is used to return the object used to manipulate renderable features for the MapView FeaturesController ShapesController
getShapesController()
This method is used to return the object used to manipulate API-fed shape data for rendering on the MapView ShapesController ThemeController
getThemeController()
This method is used to return the object used to manipulate the MapView theme ThemeController LayoutController
getLayoutController()
This method is used to return the object used to manipulate the layout of the MapView LayoutController OnStreetParkingController
getOnStreetParkingController()
This method is used to return the object used to manipulate the on street parking of the MapView OnStreetParkingController SearchController
getSearchController()
This method is used to return the object used to show POI on MapView SearchController MapDiagnosis
mapDiagnosis()
This method is used to return the object used to diagnose MapView Unit
generateSnapshot(MapView.SnapshotReadyCallback callback)
Unit
generateOffscreenSnapshot(OffscreenSnapshotInitParams config)
It generates an offscreen snapshot of the current page. Integer
getViewWidth()
Returns the width of the current surface, obtained from SurfaceContainer Integer
getViewHeight()
Returns the height of the current surface, obtained from SurfaceContainer -
-
Constructor Detail
-
TnAAOSMapView
TnAAOSMapView(Context context, AAOSMapViewInitParams mapViewInitParams)
-
TnAAOSMapView
TnAAOSMapView(Context context)
-
-
Method Detail
-
getContext
final Context getContext()
-
onSurfaceAvailable
Unit onSurfaceAvailable(SurfaceContainer surfaceContainer)
-
onSurfaceDestroyed
Unit onSurfaceDestroyed(SurfaceContainer surfaceContainer)
-
onStableAreaChanged
Unit onStableAreaChanged(Rect stableArea)
-
onVisibleAreaChanged
Unit onVisibleAreaChanged(Rect visibleArea)
-
initialize
Unit initialize(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 aMapView
.
-
createSubView
MapSubView createSubView(SubViewInitParams config)
This function creates a subview of the map.
- Parameters:
config
- SubViewInitConfig
-
isFinishedLoading
Boolean isFinishedLoading(Integer featureCategoryMask)
Method to check if the map has finished loading the specified feature categories
- Parameters:
featureCategoryMask
- The feature category mask.
-
setOnCurrentRenderModeChangedListener
Unit setOnCurrentRenderModeChangedListener(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
Unit setOnTargetRenderModeChangedListener(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
-
setFPS
Unit setFPS(Integer fps)
Set the preferred frames-per-second for the MapView renderer. Current default is 30fps
- Parameters:
fps
- the preferred frames-per-second
-
setActiveGestures
Boolean setActiveGestures(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
Unit setOnTouchListener(TouchListener listener)
Register touch event callback
- Parameters:
listener
- The press event listener TouchListener
-
setOnViewTouchListener
Unit setOnViewTouchListener(ViewTouchListener listener)
It sets the listener for the touch events on the map.
- Parameters:
listener
- ViewTouchListener?
-
setOnAnnotationTouchListener
Unit setOnAnnotationTouchListener(AnnotationTouchListener listener)
Sets the listener for annotation touch events.
- Parameters:
listener
- The listener to be set.
-
setOnRouteTouchListener
Unit setOnRouteTouchListener(RouteTouchListener listener)
Sets a listener for the route touch event.
- Parameters:
listener
- The listener to be set.
-
setOnPOITouchListener
Unit setOnPOITouchListener(POITouchListener poiTouchListener)
Register POI touch event callback
- Parameters:
poiTouchListener
- The POI press event listener POITouchListener
-
setOnMapElementTouchListener
Unit setOnMapElementTouchListener(MapElementTouchListener listener)
Register map element touch event callback
- Parameters:
listener
- The map element press event listener MapElementTouchListener
-
setOnStreetParkingTouchListener
Unit setOnStreetParkingTouchListener(OnStreetParkingTouchListener listener)
register the on-street parking touch listener
- Parameters:
listener
- the on-street parking press event listener OnStreetParkingTouchListener
-
addMapViewListener
Unit addMapViewListener(MapView.MapViewListener listener)
Register the mapView listener
- Parameters:
listener
- The mapView listener MapViewListener
-
removeMapViewListener
Unit removeMapViewListener(MapView.MapViewListener listener)
Remove the mapView listener
- Parameters:
listener
- The mapView listener MapViewListener
-
getVehicleController
VehicleController getVehicleController()
This method is used to return the object used to manipulate the vehicle representation for the MapView VehicleController
-
getRoutesController
RoutesController getRoutesController()
This method is used to return the object used to manipulate routes for the MapView RoutesController
-
getAnnotationsController
AnnotationsController getAnnotationsController()
The is method is used to return the object used to manipulate annotations for the MapView AnnotationsController
-
getCameraController
CameraController getCameraController()
This method is used to return the object used to manipulate the point of focus for the MapView CameraController
-
getFeaturesController
FeaturesController getFeaturesController()
This method is used to return the object used to manipulate renderable features for the MapView FeaturesController
-
getShapesController
ShapesController getShapesController()
This method is used to return the object used to manipulate API-fed shape data for rendering on the MapView ShapesController
-
getThemeController
ThemeController getThemeController()
This method is used to return the object used to manipulate the MapView theme ThemeController
-
getLayoutController
LayoutController getLayoutController()
This method is used to return the object used to manipulate the layout of the MapView LayoutController
-
getOnStreetParkingController
OnStreetParkingController getOnStreetParkingController()
This method is used to return the object used to manipulate the on street parking of the MapView OnStreetParkingController
-
getSearchController
SearchController getSearchController()
This method is used to return the object used to show POI on MapView SearchController
-
mapDiagnosis
MapDiagnosis mapDiagnosis()
This method is used to return the object used to diagnose MapView
-
generateSnapshot
Unit generateSnapshot(MapView.SnapshotReadyCallback callback)
Generate a bitmap image of the MapView
- Parameters:
callback
- callback to receive bitmap
-
generateOffscreenSnapshot
Unit generateOffscreenSnapshot(OffscreenSnapshotInitParams config)
It generates an offscreen snapshot of the current page.
- Parameters:
config
- OffscreenSnapshotInitConfig
-
getViewWidth
Integer getViewWidth()
Returns the width of the current surface, obtained from SurfaceContainer
-
getViewHeight
Integer getViewHeight()
Returns the height of the current surface, obtained from SurfaceContainer
-
-
-
-