Class RouteAlertGeometry

  • All Implemented Interfaces:

    
    public final class RouteAlertGeometry
    
                        

    Describes 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 startGeometryIndex and endGeometryIndex values 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.