public class GLMapRouteTracker
extends java.lang.Object
GLMapRouteTracker tracks user location on route and returns statistics and maneuver info| Modifier and Type | Class and Description |
|---|---|
static interface |
com.glmapview.GLNativeObject.Type |
| Constructor and Description |
|---|
GLMapRouteTracker(GLMapRouteData data)
Initializes new tracker
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
didPassPoint(MapGeoPoint point,
double maxDistance)
Checks if user pass the point
|
void |
dispose() |
double |
getBearingAngleOnRoute()
Returns bearing angle of current route segment
|
double |
getDistanceFromRoute()
Returns distance from route to user location
|
double |
getDistanceToLastPoint()
Returns distance to the last point of route
|
double |
getDistanceToNextManeuver()
Returns distance to the next maneuver
|
MapPoint |
getLocationOnRoute()
Returns location of user at route
|
double |
getRemainingDistance()
Returns remaining distance of the route
|
double |
getRemainingDuration()
Returns remaining time to the end of the route
|
boolean |
isOnRoute()
Returns true if user on route
|
GLMapRouteManeuver |
updateLocation(MapGeoPoint geoPoint,
float bearing)
Finds next maneuver and update information about it
|
public GLMapRouteTracker(GLMapRouteData data)
data - route datapublic GLMapRouteManeuver updateLocation(MapGeoPoint geoPoint, float bearing)
geoPoint - Coordinates of current user locationbearing - Direction where user is movingpublic double getDistanceToNextManeuver()
public double getDistanceToLastPoint()
public double getRemainingDistance()
public double getDistanceFromRoute()
public boolean isOnRoute()
public double getRemainingDuration()
public double getBearingAngleOnRoute()
public MapPoint getLocationOnRoute()
public boolean didPassPoint(MapGeoPoint point, double maxDistance)
point - Point to checkmaxDistance - Max distance from route to point in meterspublic void dispose()
Copyright © 2018 GetYourMap. All Rights Reserved.