com.supermap.navi
Class Navigation3D
- java.lang.Object
-
- com.supermap.navi.Navigation3D
-
public class Navigation3D extends java.lang.ObjectThe 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 voidaddNaviInfoListener(NaviListener listener)Adds navigation information listener.voidaddWayPoint(double x, double y, double z)Set the way throughvoidaddWayPoint(double x, double y, java.lang.String id)Set passpoint and floor IDvoidcleanPath()Clear the path analysis resultsvoidenablePanOnGuide(boolean bPan)Whether to allow the map to be dragged at boot timedoublegetCarAngle()Get the car anglePoint2DgetCarPosition()Get the car positionbooleangetCarUpFront()Gets whether the car is up front.NaviPathgetNaviPath()Get navigation path informationintgetPathID()Gets the road ID where the car is.GeoLine3D[]getRoutes()Get path analysis linedoublegetTile()Get the angle of the camera when the path is bootedbooleanisGuiding()Whether it is bootingvoidlocateMap()The car displays in the center of the screeen during navigation.voidpauseGuide()Pauses guide.voidresumeGuide()Continues to guide.booleanrouteAnalyst()Best path analysisvoidsetAzimuthChangeListener(AzimuthChangeListener listener)Set the azimuth change listenerbooleansetCarUpFront(boolean value)Set the car head upvoidsetCurrentFloorId(java.lang.String id)Sets the currently displayed floor IDvoidsetDatasource(Datasource value)Set the data source where the indoor map is located. required.voidsetDestinationPoint(double x, double y, double z)Set the destinationvoidsetDestinationPoint(double x, double y, java.lang.String id)Set destination and floor IDvoidsetDeviateTolerance(double tolerance)Adds the deviation tolerance.voidsetEncryption(Encryption encryption)Sets encryption.voidsetFloorChangeListener(FloorChangeListener listener)Add floor change listenervoidsetGPSData(LocationManagePlugin.GPSData newGps)Set up GPS datavoidsetHeight(double height)Sets the camera height when the path is bootedvoidsetHintRouteStyle(GeoStyle value)Sets the style of the other floor boot pathsvoidsetIsAutoNavi(boolean isAutoNavi)Set whether to automatically collect GPS.voidsetIsEncryptGPS(boolean isEncryptGPS)Set whether to encrypt GPS data, the default encryptionvoidsetPathVisible(boolean isVisible)Set whether the analysis path is visiblevoidsetRouteStyle(GeoStyle value)Sets the style of the current floor boot pathvoidsetSceneControl(SceneControl sceneControl)Set up three scene controlsbooleansetSimulationInterval(int interval)Sets the simulation navigation interval, in milliseconds.booleansetSimulationSpeed(double speed)Set the analog navigation speed (in m / s)voidsetStartPoint(double x, double y, double z)Set the start point.voidsetStartPoint(double x, double y, java.lang.String id)Set the start and floor IDvoidsetTile(double tile)Sets the camera tilt angle when the path is bootedbooleanstartGuide(int mode)Start guidancebooleanstopGuide()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
-
-