com.supermap.navi
Class Navigation3D
- java.lang.Object
-
- com.supermap.navi.Navigation3D
-
public class Navigation3D extends java.lang.Object
The navigation class. Support 3D navigation. This class provides path analysis and guide functions. - After setting the start and destination, you can perform path analysis and navigate after the analysis is successful.
- Path analysis consists of four modes: recommendation, fastest time, minimum distance and minimum charge.
- Guide is divided into real navigation, simulation navigation and positioning cruise and other three modes.
The guide provides the display of the boot information and the associated voice prompts.
Navigation vector map rotation (reference setCarUpFront(boolean)
}), does not support network map rotation
Note: After starting the boot, the external incoming GPS / BD and other positioning information.
-
-
Constructor Summary
Constructors Constructor and Description Navigation3D(android.content.Context context)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
addNaviInfoListener(NaviListener listener)
Adds navigation information listener.void
addWayPoint(double x, double y, double z)
Set the way throughvoid
addWayPoint(double x, double y, java.lang.String id)
Set passpoint and floor IDvoid
cleanPath()
Clear the path analysis resultsvoid
enablePanOnGuide(boolean bPan)
Whether to allow the map to be dragged at boot timedouble
getCarAngle()
Get the car anglePoint2D
getCarPosition()
Get the car positionboolean
getCarUpFront()
Gets whether the car is up front.NaviPath
getNaviPath()
Get navigation path informationint
getPathID()
Gets the road ID where the car is.GeoLine3D[]
getRoutes()
Get path analysis linedouble
getTile()
Get the angle of the camera when the path is bootedboolean
isGuiding()
Whether it is bootingvoid
locateMap()
The car displays in the center of the screeen during navigation.void
pauseGuide()
Pauses guide.void
resumeGuide()
Continues to guide.boolean
routeAnalyst()
Best path analysisvoid
setAzimuthChangeListener(AzimuthChangeListener listener)
Set the azimuth change listenerboolean
setCarUpFront(boolean value)
Set the car head upvoid
setCurrentFloorId(java.lang.String id)
Sets the currently displayed floor IDvoid
setDatasource(Datasource value)
Set the data source where the indoor map is located. required.void
setDestinationPoint(double x, double y, double z)
Set the destinationvoid
setDestinationPoint(double x, double y, java.lang.String id)
Set destination and floor IDvoid
setDeviateTolerance(double tolerance)
Adds the deviation tolerance.void
setEncryption(Encryption encryption)
Sets encryption.void
setFloorChangeListener(FloorChangeListener listener)
Add floor change listenervoid
setGPSData(LocationManagePlugin.GPSData newGps)
Set up GPS datavoid
setHeight(double height)
Sets the camera height when the path is bootedvoid
setHintRouteStyle(GeoStyle value)
Sets the style of the other floor boot pathsvoid
setIsAutoNavi(boolean isAutoNavi)
Set whether to automatically collect GPS.void
setIsEncryptGPS(boolean isEncryptGPS)
Set whether to encrypt GPS data, the default encryptionvoid
setPathVisible(boolean isVisible)
Set whether the analysis path is visiblevoid
setRouteStyle(GeoStyle value)
Sets the style of the current floor boot pathvoid
setSceneControl(SceneControl sceneControl)
Set up three scene controlsboolean
setSimulationInterval(int interval)
Sets the simulation navigation interval, in milliseconds.boolean
setSimulationSpeed(double speed)
Set the analog navigation speed (in m / s)void
setStartPoint(double x, double y, double z)
Set the start point.void
setStartPoint(double x, double y, java.lang.String id)
Set the start and floor IDvoid
setTile(double tile)
Sets the camera tilt angle when the path is bootedboolean
startGuide(int mode)
Start guidanceboolean
stopGuide()
Stop booting
-
-
-
Constructor Detail
-
Navigation3D
public Navigation3D(android.content.Context context)
Constructor- Parameters:
context
- Application context
-
-
Method Detail
-
setSceneControl
public void setSceneControl(SceneControl sceneControl)
Set up three scene controls- Parameters:
sceneControl
- 3D scene control
-
getRoutes
public GeoLine3D[] getRoutes()
Get path analysis line- Returns:
- GeoLine3D[]
-
getNaviPath
public NaviPath getNaviPath()
Get navigation path information- Returns:
- Navigation path information
-
startGuide
public boolean startGuide(int mode)
Start guidance- Parameters:
mode
- 0: real navigation, 1: simulated navigation, 2: cruise, 3: walking navigation- Returns:
- Whether to start navigation
-
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
-
enablePanOnGuide
public void enablePanOnGuide(boolean bPan)
Whether to allow the map to be dragged at boot time- Parameters:
bPan
- Whether you can drag the map
-
locateMap
public void locateMap()
The car displays in the center of the screeen during navigation.
-
isGuiding
public boolean isGuiding()
Whether it is booting- Returns:
- Whether it is in the boot
-
cleanPath
public void cleanPath()
Clear the path analysis results
-
stopGuide
public boolean stopGuide()
Stop booting- Returns:
- whether to stop booting
-
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 device
-
setGPSData
public void setGPSData(LocationManagePlugin.GPSData newGps)
Set up GPS data- Parameters:
newGps
- GPS data
-
setDatasource
public void setDatasource(Datasource value)
Set the data source where the indoor map is located. required.- Parameters:
value
- Indoor map where the 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 coordinatey
- Starting point y coordinateid
- Floor id
-
setDestinationPoint
public void setDestinationPoint(double x, double y, java.lang.String id)
Set destination and floor ID- Parameters:
x
- End x coordinatey
- End y coordinateid
- Floor id
-
addWayPoint
public void addWayPoint(double x, double y, java.lang.String id)
Set passpoint and floor ID- Parameters:
x
- End x coordinatey
- End y coordinateid
- Floor id
-
setStartPoint
public void setStartPoint(double x, double y, double z)
Set the start point.- Parameters:
x
- Starting point x coordinatey
- Starting point y coordinatez
- Starting point z coordinate
-
setDestinationPoint
public void setDestinationPoint(double x, double y, double z)
Set the destination- Parameters:
x
- End x coordinatey
- End y coordinatez
- End z coordinate
-
addWayPoint
public void addWayPoint(double x, double y, double z)
Set the way through- Parameters:
x
- Passing point x coordinatey
- Passing point y coordinatez
- Passing point z coordinate
-
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 the analysis is successful
-
setIsEncryptGPS
public void setIsEncryptGPS(boolean isEncryptGPS)
Set whether to encrypt GPS data, the default encryption- Parameters:
isEncryptGPS
- Whether it is encrypted
-
setTile
public void setTile(double tile)
Sets the camera tilt angle when the path is booted- Parameters:
tile
- Camera tilt angle
-
setHeight
public void setHeight(double height)
Sets the camera height when the path is booted- Parameters:
height
- Camera height
-
getTile
public double getTile()
Get the angle of the camera when the path is booted- Returns:
- Camera tilt angle
-
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)
Set whether to automatically collect GPS. Default auto collection- Parameters:
isAutoNavi
- Whether it is automatically collected
-
setCarUpFront
public boolean setCarUpFront(boolean value)
Set the car head up- 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
- Simulate 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 capacity
-
-