VisioMove SDK (Android)
2.1.22
|
Public Member Functions | |
void | addListener (VgINavigationListenerRefPtr pListener) |
void | removeListener (VgINavigationListenerRefPtr pListener) |
VgINavigationInstructionConstRefPtr | getInstruction (long pIndex) |
long | getNumInstructions () |
void | updateCurrentPosition (VgPosition pPosition, double pTime) |
VgPosition | getCurrentPosition () |
long | getCurrentInstructionIndex () |
VgPosition | getClosestPositionOnRoute () |
double | getDistanceFromRoute () |
long | getCurrentInstructionClosestPositionNextSubIndex () |
void | setInstructionGeofenceDistance (double pDistanceInMeters) |
double | getInstructionGeofenceDistance () |
VgINavigationRequestParameters | getRequestParameters () |
![]() | |
synchronized void | release () |
VgReferenced () | |
VgReferenced (VgReferenced pThis) | |
void | ref () |
int | unref () |
int | getNbReferences () |
VgINavigation represents a Navigation object
void VgINavigation.addListener | ( | VgINavigationListenerRefPtr | pListener | ) |
Adds a listener to the navgiation object. If the listener already exists, it does not add it.
pListener | The navigation listener to be added. |
VgPosition VgINavigation.getClosestPositionOnRoute | ( | ) |
Calculates the closest position on the route, given the current position ( VgINavigation::getCurrentPosition() ).
long VgINavigation.getCurrentInstructionClosestPositionNextSubIndex | ( | ) |
Used to determine where on the current instruction the closest position on route is.
long VgINavigation.getCurrentInstructionIndex | ( | ) |
Gets the index of the active instruction. The value will be the same as the last value given by VgINavigationListener::notifyNewInstruction() .
VgPosition VgINavigation.getCurrentPosition | ( | ) |
Gets the last position that was notified. This value will be the same as the last value given by VgINavigationListener::notifyPositionUpdated() .
double VgINavigation.getDistanceFromRoute | ( | ) |
Gets the distance between current position ( VgINavigation::getCurrentPosition() ) and closest position on route
VgINavigationInstructionConstRefPtr VgINavigation.getInstruction | ( | long | pIndex | ) |
Gets a navigation instruction
pIndex | index of instruction |
double VgINavigation.getInstructionGeofenceDistance | ( | ) |
Gets the distance in meters of the threshold when to switch instructions.
long VgINavigation.getNumInstructions | ( | ) |
Gets the number of navigation instructions
VgINavigationRequestParameters VgINavigation.getRequestParameters | ( | ) |
void VgINavigation.removeListener | ( | VgINavigationListenerRefPtr | pListener | ) |
Removes a listener from the navigation object.
pListener | The navigation listener to be removed. |
void VgINavigation.setInstructionGeofenceDistance | ( | double | pDistanceInMeters | ) |
Sets the distance in meters of the threshold when to switch instructions. this number is a function of the accuracy of the position information. If too large, instructions will switch rapidly, if too small, instructions will not change.
pDistanceInMeters | Radius distance in meters. Initial value is 2.5 meters. |
void VgINavigation.updateCurrentPosition | ( | VgPosition | pPosition, |
double | pTime | ||
) |
Injects new position. This will trigger a VgINavigationListener::notifyPositionUpdated() event. This method can be used to connect a location provider service to the navigation object.
pPosition | The new current position. The attribute mZOrAltitude of this parameter will be used to determine the corresponding layer within the map. In order for pPosition to be valid it must fall within the boundary of the map ( VgEngine::VgIDatabaseDatasetDescriptor ) and the mZOrAltitude must fall within a layer range ( VgMapModule::VgIMapModule::getHeightRangeForLayer ) |
pTime | Time of the position capture. Will be used when notifying any registered navigation listeners, ( VgNavigationModule::VgINavigationListener::notifyPositionUpdated ). If unknown, use 0. |