-
- All Implemented Interfaces:
-
com.telenav.map.api.IntersectionView
public final class TnIntersectionView implements IntersectionView
TnIntersectionView is the view for displaying detailed intersection guidance info.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classTnIntersectionView.Companion
-
Constructor Summary
Constructors Constructor Description TnIntersectionView()
-
Method Summary
Modifier and Type Method Description Unitinitialize(IntersectionViewParams intersectionViewParams)It initializes the IntersectionView with the given parameters. BooleanaddIntersectionViewData(ByteArray intersectionData, IntersectionRenderListener renderListener)Adds intersection view data to the view for rendering. UnitclearIntersectionViewData()Remove previously existing intersection data from the view UnitonSurfaceCreated()Lifecycle hooks, call this api when surface is first created. UnitonSurfaceChanged(Integer width, Integer height)Lifecycle hooks, call this api after any structural changes (format or size) have been made to the surface UnitonSurfaceDestroyed()Lifecycle hooks, call this api when a surface is being destroyed UnitonPause()Lifecycle hooks, call to pause the intersection view rendering UnitonResume()Lifecycle hooks, call to resume the intersection view rendering UnitonDestroy()Lifecycle hooks, call to destroy the intersection view instance UnitsetFPS(Integer fps)Set the preferred frames-per-second for the intersection map view renderer. UnitaddMapViewListener(MapView.MapViewListener listener)Register the mapView listener UnitremoveMapViewListener(MapView.MapViewListener listener)Remove the mapView listener ThemeControllerthemeController()CameraControllercameraController()-
-
Method Detail
-
initialize
Unit initialize(IntersectionViewParams intersectionViewParams)
It initializes the IntersectionView with the given parameters.
- Parameters:
intersectionViewParams- IntersectionViewParams
-
addIntersectionViewData
Boolean addIntersectionViewData(ByteArray intersectionData, IntersectionRenderListener renderListener)
Adds intersection view data to the view for rendering.
- Parameters:
intersectionData- A ByteArray representing the raw intersection view data to be rendered.renderListener- A callback invoked once the intersection view has finished rendering.
-
clearIntersectionViewData
Unit clearIntersectionViewData()
Remove previously existing intersection data from the view
-
onSurfaceCreated
Unit onSurfaceCreated()
Lifecycle hooks, call this api when surface is first created. The map will start drawing after this call
-
onSurfaceChanged
Unit onSurfaceChanged(Integer width, Integer height)
Lifecycle hooks, call this api after any structural changes (format or size) have been made to the surface
-
onSurfaceDestroyed
Unit onSurfaceDestroyed()
Lifecycle hooks, call this api when a surface is being destroyed
-
setFPS
Unit setFPS(Integer fps)
Set the preferred frames-per-second for the intersection map view renderer. Default fps is 30.
- Parameters:
fps- the preferred frames-per-second
-
addMapViewListener
Unit addMapViewListener(MapView.MapViewListener listener)
Register the mapView listener
- Parameters:
listener- The mapView listener {@link MapView.
-
removeMapViewListener
Unit removeMapViewListener(MapView.MapViewListener listener)
Remove the mapView listener
- Parameters:
listener- The mapView listener {@link MapView.
-
themeController
ThemeController themeController()
This method is used to return the object used to manipulate the intersection view theme ThemeController
-
cameraController
CameraController cameraController()
This method is used to return the object used to manipulate the point of focus for the intersection view CameraController
-
-
-
-