PolylineOptions

data class PolylineOptions(var coordinates: List<GeoPoint>, @ColorInt val lineColor: Int = DEFAULT_LINE_COLOR, val lineWidths: List<WidthByZoom> = listOf(WidthByZoom(DEFAULT_LINE_WIDTH)), @ColorInt val outlineColor: Int = DEFAULT_OUTLINE_COLOR, val outlineWidths: List<WidthByZoom> = listOf(WidthByZoom(DEFAULT_OUTLINE_WIDTH)), val lineStartCapType: CapType = DEFAULT_START_CAP_TYPE, val lineEndCapType: CapType = DEFAULT_END_CAP_TYPE, val isClickable: Boolean = true, val tag: String? = null, val patternImage: Image? = null)

Configures options for a Polyline overlay which can be added and displayed on the map. See the TomTomMap.addPolyline(options: PolylineOptions) to check how to add a new Polyline.

See also

, which describes its properties in a more detailed way.

Constructors

Link copied to clipboard
constructor(coordinates: List<GeoPoint>, @ColorInt lineColor: Int = DEFAULT_LINE_COLOR, lineWidths: List<WidthByZoom> = listOf(WidthByZoom(DEFAULT_LINE_WIDTH)), @ColorInt outlineColor: Int = DEFAULT_OUTLINE_COLOR, outlineWidths: List<WidthByZoom> = listOf(WidthByZoom(DEFAULT_OUTLINE_WIDTH)), lineStartCapType: CapType = DEFAULT_START_CAP_TYPE, lineEndCapType: CapType = DEFAULT_END_CAP_TYPE, isClickable: Boolean = true, tag: String? = null, patternImage: Image? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Coordinates of the line.

Link copied to clipboard
val isClickable: Boolean = true

Sets if the polyline is clickable, if this parameter is false then clicks will be propagated to objects that are below polyline.

Link copied to clipboard

Main Color of the polyline.

Link copied to clipboard

The CapType of the end cap of the Polyline to be created.

Link copied to clipboard

The CapType of the start cap of the Polyline to be created.

Link copied to clipboard

Widths of the polyline for different zoom levels.

Link copied to clipboard

Outline Color for the polyline overlay.

Link copied to clipboard

Outline widths of the polyline for different zoom levels.

Link copied to clipboard
val patternImage: Image? = null

The pattern image of the polyline. This image is repeated along the polyline, and it has priority over the solid color from lineColor.

Link copied to clipboard
val tag: String? = null

Can be used to identify group of polylines.