Builder
Responsible for instantiating an instance of MapboxRouteLineOptions
Parameters
an instance of Context
an instance of RouteLineResources
determines the elevation of the route layers
a collection of RouteStyleDescriptor objects
indicates if the vanishing route line feature is enabled
indicates if the route line will display restricted road sections with a dashed line
enabling this feature will change the color of the route legs that aren't currently being navigated. See RouteLineColorResources to specify the color used.
enabling this will display the traffic color transitions with a gradual gradient color blend. If false the color transitions will abruptly transition from one color to the next.
this value influences the length of the color transition when the displaySoftGradientForTraffic param is set to true
can be used to decrease the frequency of the vanishing route line updates improving the performance at the expense of visual appearance of the vanishing point on the line during navigation.
the pitch alignment value used for waypoint icons. The default is IconPitchAlignment.MAP
Constructors
Functions
Indicates if the route line will display restricted road sections with a dashed line. False by default.
Influences the appearance of the gradient used for the traffic line. By default there is an abrupt transition between different colors representing traffic congestion. If this value is set to true there is a smoother transition between the colors. This value is false by default.
Orientation of waypoint icons when map is pitched.
When displayRestrictedRoadSections is set to true this value will influence the length of the gradient transition between traffic congestion colors. Larger values will result in the color transition occurring over a longer length of the line. Values between 5 and 75 are recommended. The default value is 30.
Enabling this feature will result in route legs that aren't currently being navigated to be color differently than the active leg. See RouteLineColorResources for the color option.
Used for throttling the interval of updates to the vanishing route line. The default value is RouteLayerConstants.DEFAULT_VANISHING_POINT_MIN_UPDATE_INTERVAL_NANO.
Determines the icon anchor for the SymbolLayer that hosts the waypoint icons including the icons for the origin and destination points.
Determines the icon offset for the SymbolLayer that hosts the waypoint icons including the icons for the origin and destination points.
Indicates the elevation of the route line related layers. A good starting point is LocationComponentConstants.LOCATION_INDICATOR_LAYER for 2D location puck and LocationComponentConstants.MODEL_LAYER for 3D location puck.
An instance of RouteLineResources
RouteStyleDescriptor is an override of an alternative route line coloring based on a provided identifier. Setting one or more RouteStyleDescriptor objects here will configure the layer such that any route set with a matching identifier will get colored according to the values provided in the RouteStyleDescriptor.
Douglas-Peucker simplification tolerance (higher means simpler geometries and faster performance) for the GeoJsonSources created to display the route line.
Determines if the vanishing route line feature is enabled. It is not enabled by default.