-
- All Implemented Interfaces:
-
com.telenav.map.api.MapSubView,com.telenav.map.api.MapView
public final class TnMapSubView implements MapSubView
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classTnMapSubView.Companion
-
Field Summary
Fields Modifier and Type Field Description private final GLMapListenermapListenerprivate TnControllerstnControllersprivate RectviewRect
-
Constructor Summary
Constructors Constructor Description TnMapSubView(Context context, TnMapView parentView, GLEngineJNI engine, MapViewReadyListener<MapSubView> readyListener, Double x, Double y, Integer width, Integer height, Float zoomLevel)
-
Method Summary
Modifier and Type Method Description final GLMapListenergetMapListener()final TnControllersgetTnControllers()final UnitsetTnControllers(TnControllers tnControllers)final RectgetViewRect()final UnitsetViewRect(Rect viewRect)final MapEngineViewDelegatecontroller()final GLMapListenermapListener()Unitinitialize(MapViewInitConfig config)Provide all important components to initialize the map and engine stuff. MapSubViewcreateSubView(SubViewInitParams config)This function creates a subview of the map. BooleanisFinishedLoading(Integer featureCategoryMask)Check the engine initialization status for specified features UnitsetOnCurrentRenderModeChangedListener(CurrentRenderModeChangeListener currentRenderModeChangeListener)UnitsetOnTargetRenderModeChangedListener(TargetRenderModeChangeListener targetRenderModeChangedListener)UnitonPause()Lifecycle hooks, call from owning fragment or activity UnitonResume()Lifecycle hooks, call from owning fragment or activity UnitsetFPS(Integer fps)Set the preferred frames-per-second for the MapView renderer. BooleansetActiveGestures(Set<GestureType> activeGestures)UnitsetOnTouchListener(TouchListener listener)Register touch event callback UnitsetOnViewTouchListener(ViewTouchListener listener)Register the touch listener UnitsetOnAnnotationTouchListener(AnnotationTouchListener listener)Register annotation touch event callback UnitsetOnRouteTouchListener(RouteTouchListener listener)Register route touch event callback UnitsetOnMapElementTouchListener(MapElementTouchListener listener)Register map element touch event callback UnitsetOnStreetParkingTouchListener(OnStreetParkingTouchListener listener)register the on-street parking touch listener UnitaddMapViewListener(MapView.MapViewListener listener)Register the mapView listener UnitsetOnPOITouchListener(POITouchListener poiTouchListener)Register POI touch event callback UnitremoveMapViewListener(MapView.MapViewListener listener)Remove the mapView listener VehicleControllergetVehicleController()RoutesControllergetRoutesController()AnnotationsControllergetAnnotationsController()CameraControllergetCameraController()FeaturesControllergetFeaturesController()This method is used to return the object used to manipulate renderable features for the MapView FeaturesController ShapesControllergetShapesController()This method is used to return the object used to manipulate API-fed shape data for rendering on the MapView ShapesController ThemeControllergetThemeController()LayoutControllergetLayoutController()OnStreetParkingControllergetOnStreetParkingController()This method is used to return the object used to manipulate the on street parking of the MapView OnStreetParkingController SearchControllergetSearchController()It returns the search controller. DynamicPOISearchControllergetDynamicPOISearchController()This method is used to return the object used to manipulate dynamic POI search on MapView. MapDiagnosismapDiagnosis()UnitgenerateSnapshot(MapView.SnapshotReadyCallback callback)*** MapSubView interface UnitgenerateOffscreenSnapshot(OffscreenSnapshotInitParams config)It generates an offscreen snapshot of the current page. UnitresizeView(Double x, Double y, Integer width, Integer height)UnitdeleteView()-
-
Constructor Detail
-
TnMapSubView
TnMapSubView(Context context, TnMapView parentView, GLEngineJNI engine, MapViewReadyListener<MapSubView> readyListener, Double x, Double y, Integer width, Integer height, Float zoomLevel)
-
-
Method Detail
-
getMapListener
final GLMapListener getMapListener()
-
getTnControllers
final TnControllers getTnControllers()
-
setTnControllers
final Unit setTnControllers(TnControllers tnControllers)
-
getViewRect
final Rect getViewRect()
-
setViewRect
final Unit setViewRect(Rect viewRect)
-
controller
final MapEngineViewDelegate controller()
-
mapListener
final GLMapListener mapListener()
-
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)
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
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 GestureType
-
setOnTouchListener
Unit setOnTouchListener(TouchListener listener)
Register touch event callback
- Parameters:
listener- The press event listener TouchListener
-
setOnViewTouchListener
Unit setOnViewTouchListener(ViewTouchListener listener)
Register the touch listener
- Parameters:
listener- The touch listener ViewTouchListener
-
setOnAnnotationTouchListener
Unit setOnAnnotationTouchListener(AnnotationTouchListener listener)
Register annotation touch event callback
- Parameters:
listener- The annotation press event listener AnnotationTouchListener
-
setOnRouteTouchListener
Unit setOnRouteTouchListener(RouteTouchListener listener)
Register route touch event callback
- Parameters:
listener- The route press event listener RouteTouchListener
-
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
-
setOnPOITouchListener
Unit setOnPOITouchListener(POITouchListener poiTouchListener)
Register POI touch event callback
- Parameters:
poiTouchListener- The POI press event listener POITouchListener
-
removeMapViewListener
Unit removeMapViewListener(MapView.MapViewListener listener)
Remove the mapView listener
- Parameters:
listener- The mapThe 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()
This 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()
It returns the search controller.
Warning: This method is not supported in TnMapSubView
-
getDynamicPOISearchController
DynamicPOISearchController getDynamicPOISearchController()
This method is used to return the object used to manipulate dynamic POI search on MapView.
-
mapDiagnosis
MapDiagnosis mapDiagnosis()
This method is used to return the object used to diagnose MapView
-
generateSnapshot
Unit generateSnapshot(MapView.SnapshotReadyCallback callback)
*** MapSubView interface
- Parameters:
callback- callback to receive bitmap
-
generateOffscreenSnapshot
Unit generateOffscreenSnapshot(OffscreenSnapshotInitParams config)
It generates an offscreen snapshot of the current page.
- Parameters:
config- OffscreenSnapshotInitConfig
-
deleteView
Unit deleteView()
-
-
-
-