com.supermap.navi

Class Navigation3

  • java.lang.Object
    • com.supermap.navi.Navigation3


  • public class Navigation3
    extends java.lang.Object
    Indoor navigation class Similar to industry navigation, it provides path analysis and guidance based on topology road network. The difference is that when setting the start, end, or route point, you need to set the ID of the floor on which it is located, and the floor ID can be obtained by FloorListView.getCurrentFloorId() of the FoorListView's associated with the map

    Support the use of custom network data to navigate, and can edit the modified road network data, road network data through the indoor map data where the data source associated with the indoor navigation module;

    Supports analog navigation speed

    Supports guided path style settings, including the current display floor and other floor path style;

    Support for custom GPS encryption;

    Provide vector map of the map rotation function (reference ), the network map is not supported.

    • Method Detail

      • getNaviPath

        public NaviPath getNaviPath()
        Get navigation path information
        Returns:
        Navigation path information object
      • startGuide

        public boolean startGuide(int mode)
        Start guidance
        Parameters:
        mode - 0: real navigation, 1: simulated navigation, 2: cruise, 3: walking navigation
        Returns:
        whether succeed
      • getCarAngle

        public double getCarAngle()
        Get the car angle
        Returns:
        Car angle
      • getCarPosition

        public Point2D getCarPosition()
        Get the car position
        Returns:
        Car position
      • getPathID

        public int getPathID()
        Gets the road ID where the car is.
        Returns:
        Road ID
      • getResultIndex

        public int getResultIndex()
        Gets the route where the car is located
        Returns:
        the analyzed route
      • enablePanOnGuide

        public void enablePanOnGuide(boolean bPan)
        Whether to allow the map to be dragged at boot time
        Parameters:
        bPan - A Boolean value that indicates whether the map is allowed to be translated during the navigation process, true, indicating that allowed, false, that is not allowed.
      • locateMap

        public void locateMap()
        The car displays in the center of the screeen during navigation.
      • isGuiding

        public boolean isGuiding()
        Determines whether it is guiding.
        Returns:
        Whether it is booting.
      • cleanPath

        public void cleanPath()
        Clear the path analysis results
      • stopGuide

        public boolean stopGuide()
        Stop booting
        Returns:
        whether succeed.
      • setPathVisible

        public void setPathVisible(boolean isVisible)
        Set whether the analysis path is visible
        Parameters:
        isVisible - Is it visible?
      • setEncryption

        public void setEncryption(Encryption encryption)
        Sets encryption.
        Parameters:
        encryption - Encryption Algorithm
      • setDatasource

        public void setDatasource(Datasource value)
        Set the data source where the indoor map is located. required
        Parameters:
        value - data source
      • setStartPoint

        public void setStartPoint(double x,
                                  double y,
                                  java.lang.String id)
        Set the start and floor ID
        Parameters:
        x - Starting point x coordinate
        y - Starting point y coordinate
        id - Floor ID
      • setDestinationPoint

        public void setDestinationPoint(double x,
                                        double y,
                                        java.lang.String id)
        Set destination and floor ID
        Parameters:
        x - End x coordinate
        y - End y coordinate
        id - Floor ID
      • addWayPoint

        public void addWayPoint(double x,
                                double y,
                                java.lang.String id)
        Set the way point and floor ID, need to set the starting point and the end point in order to successfully add the way point
        Parameters:
        x - End x coordinate
        y - End y coordinate
        id - Floor ID
      • setCurrentFloorId

        public void setCurrentFloorId(java.lang.String id)
        Sets the currently displayed floor ID
        Parameters:
        id - Floor ID
      • routeAnalyst

        public boolean routeAnalyst()
        Best path analysis
        Returns:
        whether succeed
      • setIsEncryptGPS

        public void setIsEncryptGPS(boolean isEncryptGPS)
        Set whether to encrypt GPS data, the default encryption
        Parameters:
        isEncryptGPS - Whether to encrypt GPS data
      • setCarPicture

        public void setCarPicture(android.graphics.Bitmap carBmp)
        Set the car icon
        Parameters:
        carBmp - icon bitMap
      • setFloorChangeListener

        public void setFloorChangeListener(FloorChangeListener listener)
        Add floor change listener
        Parameters:
        listener - Floor change listener
      • setAzimuthChangeListener

        public void setAzimuthChangeListener(AzimuthChangeListener listener)
        Set the azimuth change listener
        Parameters:
        listener - azimuth change listener
      • setIsAutoNavi

        public void setIsAutoNavi(boolean isAutoNavi)
        Sets whether to automatically collect GPS Auto collection is by default
        Parameters:
        isAutoNavi - Whether to automatically collect GPS
      • setCarSize

        public void setCarSize(float width,
                               float height)
        Sets the car icon size.
        Parameters:
        width - width
        height - height
      • setCarUpFront

        public boolean setCarUpFront(boolean value)
        Sets whether the car is up front. The map can rotate if it is true.

        To use the map rotation also need to open the full screen drawing function in advance , then useMap.setFullScreenDrawModel(boolean), and then set the head up to achieve the map rotation.

        The current map rotation only supports the rotation of the vector map, and the network map can not be rotated.

        When the map is a network map, set the parameter value = true, return false, and will output the corresponding log information; when the map for the vector map, set the parameter value = true, return true; set the parameter value = false, the total return success, The map will not rotate in the navigation

        Use the demonstration as follows:

             map.open (mapName); //Open a map
             map.setFullScreenDrawModel(true);        // Set the full-screen drawing
             navigation.setCarUpFront (true); // Set the car up front. If you want to make map rotation by tapping the north arrow on the map, you don't need to use this clause.
         
        Parameters:
        value - True, the car head up; for false, the car front and the road in line
        Returns:
        Whether the settings are successful
      • getCarUpFront

        public boolean getCarUpFront()
        Gets whether the car is up front.
        Returns:
        Whether the car head up
      • setRouteStyle

        public void setRouteStyle(GeoStyle value)
        Sets the style of the current floor boot path
        Parameters:
        value - The style of the boot path
      • setHintRouteStyle

        public void setHintRouteStyle(GeoStyle value)
        Sets the style of the other floor boot paths
        Parameters:
        value - The style of the boot path
      • addNaviInfoListener

        public void addNaviInfoListener(NaviListener listener)
        Adds navigation information listener.
        Parameters:
        listener - Boot information update listener
      • resumeGuide

        public void resumeGuide()
        Continues to guide.
      • pauseGuide

        public void pauseGuide()
        Pauses guide.
      • setSimulationSpeed

        public boolean setSimulationSpeed(double speed)
        Set the analog navigation speed (in m / s)
        Parameters:
        speed - Navigation speed
        Returns:
        Whether the settings are successful
      • setSimulationInterval

        public boolean setSimulationInterval(int interval)
        Sets the simulation navigation interval, in milliseconds.
        Parameters:
        interval - Navigation interval
        Returns:
        Whether the settings are successful
      • setDeviateTolerance

        public void setDeviateTolerance(double tolerance)
        Adds the deviation tolerance.
        Parameters:
        tolerance - Offset tolerance
      • getSpeed

        public double getSpeed()
        Gets the speed. Unit is m/s
        Returns:
        Driving speed
      • setSpeed

        public void setSpeed(double speed)
        Set the travel speed in m / s
        Parameters:
        speed - Driving speed
      • getRoute

        public GeoLine[] getRoute()
        Get path analysis line
        Returns:
        analysis route.
      • setPassedRouteHidden

        public void setPassedRouteHidden(Map map,
                                         boolean isAutoHidden)
        Sets whether to hide the passed routes. (The routes are hidden when the analyzed routes are invisible) Note: to use it, you must call it before the path analysis
        Parameters:
        map - map object
        isAutoHidden - Whether to hide
      • isPassedRouteHidden

        public boolean isPassedRouteHidden()
        Whether to hide all passed routes
        Returns:
        whether to hide
      • setGuideEndDistance

        public void setGuideEndDistance(double distance)
        Sets the distance to the destination when the navigation finished. Unit is meter
        Parameters:
        distance - the distance to the destination when the navigation finished.
      • getGuideEndDistance

        public double getGuideEndDistance()
        Gets the distance to the destination when the navigation finished. Unit is meter
        Returns:
        the distance to the destination when the navigation finished.
      • setWayPointTolerance

        public void setWayPointTolerance(double tolerance)
        Sets the tolerance of passing points during a navigation
        Parameters:
        tolerance - The range of passing points
      • getWayPointTolerance

        public double getWayPointTolerance(double tolerance)
        Sets the tolerance of passing points during a navigation
        Parameters:
        tolerance - The range of passing points
        Returns:
        Tolerance
      • setDrivingModeEnable

        public void setDrivingModeEnable(boolean drivingMode)
        Sets whether it is the indoor driving mode
        Parameters:
        drivingMode - false is by default
      • isDrivingModeEnable

        public boolean isDrivingModeEnable()
        Sets whether it is the indoor driving mode
        Returns:
        true means yes
      • setAotuReRouteEnable

        public void setAotuReRouteEnable(boolean reRoute)
        Sets whether to re-plan routes when the user did not follow the original navigation. The setting is valid under the indoor driving mode.
        Parameters:
        reRoute - true means re-planning routes.
      • isAotuReRouteEnable

        public boolean isAotuReRouteEnable()
        Gets whether to re-plan routes when the user did not follow the original navigation.
        Returns:
        true means re-planning routes. otherwise, return false.
      • setNearestDoorMode

        public void setNearestDoorMode(boolean flag)
        Sets the closest-door mode. True means the application will select the closest door as the starting/ending point when performing a path analysis.
        Parameters:
        flag -
      • isNearestDoorMode

        public boolean isNearestDoorMode()
        Determines whether it is the closest-door mode.
        Returns:
        Whether it is the closest-door mode.