-
- 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)MapSubViewcreateSubView(SubViewInitParams config)Lifecycle hooks, call from owning fragment or activity BooleanisFinishedLoading(Integer featureCategoryMask)Set the preferred frames-per-second for the MapView renderer. UnitsetOnCurrentRenderModeChangedListener(CurrentRenderModeChangeListener currentRenderModeChangeListener)sets the listener for the current rendering mode changes(between 2D and 3D) UnitsetOnTargetRenderModeChangedListener(TargetRenderModeChangeListener targetRenderModeChangedListener)sets the listener for the target rendering mode changes(between 2D and 3D) 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)Set active gestures for the view. 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()This method is used to return the object used to manipulate routes for the MapView RoutesController RoutesControllergetRoutesController()This method is used to return the object used to manipulate annotations for the MapView AnnotationsController AnnotationsControllergetAnnotationsController()This method is used to return the object used to manipulate renderable features for the MapView FeaturesController CameraControllergetCameraController()This method is used to return the object used to manipulate API-fed shape data for rendering on the MapView ShapesController FeaturesControllergetFeaturesController()This method is used to return the object used to manipulate the layout of the MapView LayoutController ShapesControllergetShapesController()Warning: This method is not supported in TnMapSubView ThemeControllergetThemeController()This method is used to return the object used to manipulate the MapView theme ThemeController LayoutControllergetLayoutController()This method is used to return the object used to manipulate the layout of the MapView LayoutController 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()This method is used to return the object used to diagnose MapView UnitgenerateSnapshot(MapView.SnapshotReadyCallback callback)Generate a bitmap image of the MapView 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)
- Parameters:
config- is a data class that holds the context, dpi, default location, and ready listener for aMapView.
-
createSubView
MapSubView createSubView(SubViewInitParams config)
Lifecycle hooks, call from owning fragment or activity
- Parameters:
config- SubViewInitConfig
-
isFinishedLoading
Boolean isFinishedLoading(Integer featureCategoryMask)
Set the preferred frames-per-second for the MapView renderer. Current default is 30fps
- 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
-
onPause
Unit onPause()
Lifecycle hooks, call from owning fragment or activity
-
onResume
Unit onResume()
Lifecycle hooks, call from owning fragment or activity
-
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 routes for the MapView RoutesController
-
getRoutesController
RoutesController getRoutesController()
This method is used to return the object used to manipulate annotations for the MapView AnnotationsController
-
getAnnotationsController
AnnotationsController getAnnotationsController()
This method is used to return the object used to manipulate renderable features for the MapView FeaturesController
-
getCameraController
CameraController getCameraController()
This method is used to return the object used to manipulate API-fed shape data for rendering on the MapView ShapesController
-
getFeaturesController
FeaturesController getFeaturesController()
This method is used to return the object used to manipulate the layout of the MapView LayoutController
-
getShapesController
ShapesController getShapesController()
Warning: This method is not supported in TnMapSubView
-
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)
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
-
resizeView
Unit resizeView(Double x, Double y, Integer width, Integer height)
-
deleteView
Unit deleteView()
-
-
-
-