public class GLRouteTracker
extends com.getyourmap.glmap.GLNativeObject
GLMapRouteTracker tracks user location on route and returns statistics and maneuver info| Constructor and Description |
|---|
GLRouteTracker(GLRoute data)
Initializes new tracker
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
didPassPoint(com.getyourmap.glmap.MapGeoPoint point,
double maxDistance)
Checks if user pass the point
|
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
|
com.getyourmap.glmap.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
|
GLRouteManeuver |
updateLocation(double lat,
double lon,
float bearing)
Finds next maneuver and update information about it
|
public GLRouteTracker(GLRoute data)
data - route datapublic GLRouteManeuver updateLocation(double lat, double lon, float bearing)
lat - Latitude of current user locationlon - Longitude 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 com.getyourmap.glmap.MapPoint getLocationOnRoute()
public boolean didPassPoint(com.getyourmap.glmap.MapGeoPoint point,
double maxDistance)
point - Point to checkmaxDistance - Max distance from route to point in metersCopyright © 2018 GetYourMap. All Rights Reserved.