Class RouteAlertGeometry
-
- All Implemented Interfaces:
public final class RouteAlertGeometryDescribes the geometry of a RouteAlert that has a length.
Use LineString.fromPolyline with DirectionsRoute.geometry and the precision argument that was used when requesting the route (RouteOptions.Builder.geometries) to decode the route. When decoded, you can find the geometry of the alert using the
startGeometryIndexandendGeometryIndexvalues as arguments for LineString.coordinates. This sublist of coordinates can be used to create and draw the geometry with LineString.fromLngLats.Also see RouteAlertGeometry.toLineString extension which automates above.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classRouteAlertGeometry.BuilderUse to create a new instance.
-
Field Summary
Fields Modifier and Type Field Description private final Doublelengthprivate final PointstartCoordinateprivate final IntegerstartGeometryIndexprivate final PointendCoordinateprivate final IntegerendGeometryIndex
-
Method Summary
Modifier and Type Method Description final DoublegetLength()final PointgetStartCoordinate()final IntegergetStartGeometryIndex()final PointgetEndCoordinate()final IntegergetEndGeometryIndex()final RouteAlertGeometry.BuildertoBuilder()Transform this object into a builder to mutate the values. Booleanequals(Object other)Indicates whether some other object is "equal to" this one. IntegerhashCode()Returns a hash code value for the object. StringtoString()Returns a string representation of the object.
-
-
-
Method Detail
-
getStartCoordinate
final Point getStartCoordinate()
-
getStartGeometryIndex
final Integer getStartGeometryIndex()
-
getEndCoordinate
final Point getEndCoordinate()
-
getEndGeometryIndex
final Integer getEndGeometryIndex()
-
toBuilder
final RouteAlertGeometry.Builder toBuilder()
Transform this object into a builder to mutate the values.
-
-