VietMapSnapEngine class
Support snapping user location to route, tracking user's distance to route, etc.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
calculateRouteDistance(
List< LatLng> route) → double - Calculate the distance of the route
-
distanceToEndOfRoute(
List< LatLng> route, LatLng point) → double - Calculate the distance from the user's location to the end of the route. Response measure in meters
-
distanceToStartOfRoute(
List< LatLng> route, LatLng point) → double - Calculate the distance from the user's location to the start of the route Response measure in meters
-
getRouteRemaining(
List< LatLng> route, LatLng point) → List<LatLng> -
Get the remaining route from the user's location
routethe original routepointthe user's location Return the remaining route from the user's location -
getRouteTraveled(
List< LatLng> route, LatLng point) → List<LatLng> -
Get the traveled route from the user's location
routethe original routepointthe user's location Return the traveled route from the user's location -
isUserOffRoute(
List< LatLng> route, LatLng point, {Unit unit = Unit.meters, double limitDistance = 30}) → bool -
Check if the user is off route
routethe route to snap topointthe user's locationunitthe unit of distance, default is meters. This unit will be applied for both of the result distance and limitDistance fieldslimitDistancethe limit distance to consider the user is off route, default is 30 meters -
snapToRoute(
List< LatLng> route, LatLng point, [Unit unit = Unit.kilometers]) → NearestLatLngResult? -
Find the nearest point on the route to the user's location
routethe route to snap topointthe user's locationunitthe unit of distance, default is kilometers. The unit will applied to the distance field in the result.