RouteStyle

class RouteStyle(@ColorInt val activeLineColor: Int = DEFAULT_ACTIVE_LINE_COLOR, @ColorInt val alternativeLineColor: Int = DEFAULT_ALTERNATIVE_LINE_COLOR, val alternativeLineColorOverrule: Map<Int, Int> = emptyMap(), val activeLineWidths: List<WidthByZoom> = DEFAULT_ACTIVE_LINE_WIDTHS, val alternativeLineWidths: List<WidthByZoom> = DEFAULT_ALTERNATIVE_LINE_WIDTHS, val activeOutlineWidths: List<WidthByZoom> = DEFAULT_ACTIVE_OUTLINE_WIDTHS, val alternativeOutlineWidths: List<WidthByZoom> = DEFAULT_ALTERNATIVE_OUTLINE_WIDTHS, val waypointMarkerImage: Image = ImageFactory.fromResource(DEFAULT_WAYPOINT_MARKER_IMAGE), val departureMarkerImage: Image = ImageFactory.fromResource(DEFAULT_DEPARTURE_MARKER_IMAGE), val destinationMarkerImage: Image = ImageFactory.fromResource(DEFAULT_DESTINATION_MARKER_IMAGE), val areWaypointsVisible: Boolean = DEFAULT_WAYPOINTS_VISIBILITY, val isDestinationMarkerVisible: Boolean = DEFAULT_DESTINATION_MARKER_VISIBILITY, val isDepartureMarkerVisible: Boolean = DEFAULT_DEPARTURE_MARKER_VISIBILITY, val destinationConnectionLineStyle: RouteStyle.DestinationConnectionLineStyle = DestinationConnectionLineStyle(), val evWaypointMarkerStyle: RouteStyle.EvWaypointMarkerStyle = EvWaypointMarkerStyle(), val routeVehicleRestrictionLineStyle: RouteStyle.RouteVehicleRestrictionLineStyle = RouteVehicleRestrictionLineStyle())

Represents a style configuration for the routes.

The properties related to the active route (i.e., the properties prefixed with "active") also apply to the selected route during the route planning phase.

During instance construction, certain input values are checked against the range of values expected for that field (e.g., width values must be non-negative).

Default assets and resources are bundled into the library. You do not need to supply any asset/resource files unless you want to customize something (for example, the icon of waypoint markers).

Important: This is a Public Preview API. It may be changed or removed at any time.

Constructors

Link copied to clipboard
constructor(@ColorInt activeLineColor: Int = DEFAULT_ACTIVE_LINE_COLOR, @ColorInt alternativeLineColor: Int = DEFAULT_ALTERNATIVE_LINE_COLOR, alternativeLineColorOverrule: Map<Int, Int> = emptyMap(), activeLineWidths: List<WidthByZoom> = DEFAULT_ACTIVE_LINE_WIDTHS, alternativeLineWidths: List<WidthByZoom> = DEFAULT_ALTERNATIVE_LINE_WIDTHS, activeOutlineWidths: List<WidthByZoom> = DEFAULT_ACTIVE_OUTLINE_WIDTHS, alternativeOutlineWidths: List<WidthByZoom> = DEFAULT_ALTERNATIVE_OUTLINE_WIDTHS, waypointMarkerImage: Image = ImageFactory.fromResource(DEFAULT_WAYPOINT_MARKER_IMAGE), departureMarkerImage: Image = ImageFactory.fromResource(DEFAULT_DEPARTURE_MARKER_IMAGE), destinationMarkerImage: Image = ImageFactory.fromResource(DEFAULT_DESTINATION_MARKER_IMAGE), areWaypointsVisible: Boolean = DEFAULT_WAYPOINTS_VISIBILITY, isDestinationMarkerVisible: Boolean = DEFAULT_DESTINATION_MARKER_VISIBILITY, isDepartureMarkerVisible: Boolean = DEFAULT_DEPARTURE_MARKER_VISIBILITY, destinationConnectionLineStyle: RouteStyle.DestinationConnectionLineStyle = DestinationConnectionLineStyle(), evWaypointMarkerStyle: RouteStyle.EvWaypointMarkerStyle = EvWaypointMarkerStyle(), routeVehicleRestrictionLineStyle: RouteStyle.RouteVehicleRestrictionLineStyle = RouteVehicleRestrictionLineStyle())

Types

Link copied to clipboard
object Companion
Link copied to clipboard
class DestinationConnectionLineStyle(val linePatternTexture: Image = DEFAULT_LINE_PATTERN_TEXTURE, val patternWidth: Double = DEFAULT_PATTERN_WIDTH, val outlineColor: Int = DEFAULT_OUTLINE_COLOR)

Represents a style configuration for the line between the final destination point and the final navigable point.

Link copied to clipboard
class EvWaypointMarkerStyle(val pinImage: Image = ImageFactory.fromResource(DEFAULT_EV_WAYPOINT_MARKER_IMAGE), @ColorInt val textColor: Int = DEFAULT_TEXT_COLOR, val textSize: Double = DEFAULT_TEXT_SIZE, val fontUri: Uri = DEFAULT_FONT_URI, val textAnchoring: TextAnchoring = DEFAULT_TEXT_ANCHORING, val textOffset: PointF = DEFAULT_TEXT_OFFSET)

Represents a style configuration for the EV charging station waypoint marker.

Link copied to clipboard

Represents the criteria for vehicle restriction lines to be displayed with a pattern.

Link copied to clipboard
class RouteVehicleRestrictionLineStyle(@ColorInt val lineColor: Int = DEFAULT_LINE_COLOR, @ColorInt val lineOutlineColor: Int = DEFAULT_LINE_COLOR, val lineWidths: List<WidthByZoom> = DEFAULT_LINE_WIDTHS, val lineOutlineWidths: List<WidthByZoom> = DEFAULT_LINE_OUTLINE_WIDTHS, val lineStartCapType: CapType = DEFAULT_LINE_START_CAP_TYPE, val lineEndCapType: CapType = DEFAULT_LINE_END_CAP_TYPE, val linePatternDisplay: RouteStyle.LinePatternDisplay = DEFAULT_LINE_PATTERN_DISPLAY_MINOR, val linePatternImage: Image? = DEFAULT_LINE_PATTERN_IMAGE)

Represents a style configuration for the vehicle restriction line.

Properties

Link copied to clipboard

The color of the active route. You can control the opacity of the route line by using the alpha component of the ARGB color integer.

Link copied to clipboard

The line width (in dp units) of the active route. This parameter must be a non-empty list containing non-negative values for both the width and the zoom level that width is used at. Items in this list must not contain duplicated zoom level values.

Link copied to clipboard

The outline width (in dp units) of the active route. This parameter must be a non-empty list containing non-negative values for both the width and the zoom level that width is used at. Items in this list must not contain duplicated zoom level values.

Link copied to clipboard

Sets the same color for all the alternative routes. If it's desired to overrule this semantic, alternativeLineColorOverrule property can be used by specifying the color per the index of the alternative route. You can control the opacity of the route line by using the alpha component of the ARGB color integer.

Link copied to clipboard

The color to individually overrule the color specified in alternativeLineColor. You can control the opacity of the route line by using the alpha component of the ARGB color integer.

Link copied to clipboard

The outline width (in dp units) of the alternative routes. This parameter must be a non-empty list containing non-negative values for both the width and the zoom level that width is used at. Items in this list must not contain duplicated zoom level values.

Link copied to clipboard

The outline width (in dp units) of the alternative routes. This parameter must be a non-empty list containing non-negative values for both the width and the zoom level that width is used at. Items in this list must not contain duplicated zoom level values.

Link copied to clipboard

The visibility of route waypoints.

Link copied to clipboard

The pin image for the departure marker.

Link copied to clipboard

The pin image for the destination marker.

Link copied to clipboard

The visibility of the departure marker. Default value is false.

Link copied to clipboard

The visibility of the destination marker. Default value is true.

Link copied to clipboard

The pin image for waypoint markers.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String