Package 

Class TnClusterMapView

  • All Implemented Interfaces:
    com.telenav.map.api.ClusterMapView , com.telenav.map.api.MapTouchListeners

    
    public final class TnClusterMapView
     implements ClusterMapView, MapTouchListeners
                        

    ClusterMapView is the interface for displaying map information on cluster device. It supports basic map/traffic functions, such as annotation rendering, vehicle rendering or traffic rendering.

    • Constructor Detail

      • TnClusterMapView

        TnClusterMapView()
    • Method Detail

      • initialize

         Unit initialize(ClusterMapViewParams clusterMapViewParams)

        Initialize the map view with the given parameters

        Parameters:
        clusterMapViewParams - ClusterMapViewParams
      • isFinishedLoading

         Boolean isFinishedLoading(Integer featureCategoryMask)

        Lifecycle hooks, call this api when surface is first created. The map will start drawing after this call

        Parameters:
        featureCategoryMask - represents the features of the render engine that are required to be loaded(features are describe above)
      • onSurfaceCreated

         Unit onSurfaceCreated()

        Lifecycle hooks, call to pause the cluster view rendering

      • onSurfaceChanged

         Unit onSurfaceChanged(Integer width, Integer height)

        Lifecycle hooks, call to resume the cluster view rendering

      • onSurfaceChanged

         Unit onSurfaceChanged(Surface surface, Integer width, Integer height)

        Lifecycle hooks, call to destroy the cluster view instance

      • onSurfaceDestroyed

         Unit onSurfaceDestroyed()

        Set the preferred frames-per-second for the cluster map view renderer. Default fps is 30.

      • onPause

         Unit onPause()

        Register the mapView listener

      • onResume

         Unit onResume()

        Remove the mapView listener

      • onDestroy

         Unit onDestroy()

        Warning! Using Controllers before the {@link MapViewReadyListener} notification will result in a crash This method is used to return the object used to manipulate the vehicle representation for the ClusterMapView {@link VehicleController}

      • setFPS

         Unit setFPS(Integer fps)

        Warning! Using Controllers before the {@link MapViewReadyListener} notification will result in a crash This method is used to return the object used to manipulate routes for the ClusterMapView {@link RoutesController}

        Parameters:
        fps - the preferred frames-per-second
      • addMapViewListener

         Unit addMapViewListener(MapView.MapViewListener listener)

        Warning! Using Controllers before the {@link MapViewReadyListener} notification will result in a crash This method is used to return the object used to manipulate annotations for the ClusterMapView {@link AnnotationsController}

        Parameters:
        listener - The mapView listener MapView.MapViewListener
      • removeMapViewListener

         Unit removeMapViewListener(MapView.MapViewListener listener)

        Warning! Using Controllers before the {@link MapViewReadyListener} notification will result in a crash This method is used to return the object used to manipulate the point of focus for the ClusterMapView {@link CameraController}

        Parameters:
        listener - The mapThe mapView listener MapView.MapViewListener
      • vehicleController

         TnVehicleController vehicleController()

        Warning! Using Controllers before the {@link MapViewReadyListener} notification will result in a crash This method is used to return the object used to manipulate renderable features for the ClusterMapView {@link FeaturesController}

      • routesController

         TnRoutesController routesController()

        Warning! Using Controllers before the {@link MapViewReadyListener} notification will result in a crash This method is used to return the object used to manipulate API-fed shape data for rendering on the ClusterMapView {@link ShapesController}

      • annotationsController

         TnAnnotationsController annotationsController()

        Warning! Using Controllers before the {@link MapViewReadyListener} notification will result in a crash This method is used to return the object used to manipulate the ClusterMapView theme {@link ThemeController}

      • cameraController

         TnCameraController cameraController()

        Warning! Using Controllers before the {@link MapViewReadyListener} notification will result in a crash This method is used to return the object used to manipulate the layout of the ClusterMapView {@link LayoutController}

      • featuresController

         TnFeaturesController featuresController()

        This method is used to return the object used to diagnose ClusterMapView

      • shapesController

         TnShapesController shapesController()

        Please avoid do some heavy action here, it will block map render thread or build thread

      • themeController

         TnThemeController themeController()

        to check the zoom level change

      • layoutController

         TnLayoutController layoutController()

        Using Controllers before the {@link MapViewReadyListener} notification will result in a crash This method is used to return the object used to manipulate the layout of the ClusterMapView {@link LayoutController}

      • mapDiagnosis

         MapDiagnosis mapDiagnosis()

        This is not supported for cluster map view

      • setOnTouchListener

         Unit setOnTouchListener(TouchListener listener)

        Sets the touch listener on this view.

        Parameters:
        listener - callback interface implementation