sdk-maps / com.tomtom.online.sdk.map / PolylineBuilder

PolylineBuilder

class PolylineBuilder

Polyline overlay for the map.

Functions

build

fun build(): Polyline

Create polyline overlay for a given map view. Polyline width must be greater than 0. Minimum number of points must be 2. Otherwise, the exception is thrown.

color

fun color(color: Int): PolylineBuilder

The color in RGBA format of the overlay

coordinate

fun coordinate(coordinate: LatLng): PolylineBuilder

Sets a coordinate that will be added to the coordinates list.

coordinates

fun coordinates(coordinates: List<LatLng>): PolylineBuilder

Set list of polyline corners.

id

fun id(id: Long): PolylineBuilder

The id of the Overlay. It is unique value which distinguish overlays.

opacity

fun opacity(opacity: Float): PolylineBuilder

Overlay opacity. Must be between 0.0 and 1.0.

tag

fun tag(tag: Any): PolylineBuilder

It can be used for filtering, e.g. to remove annotation of certain tag. Default value is set to null.@param tag the overlay tag. Default value is null.

width

fun width(width: Float): PolylineBuilder

Sets polyline width in pixels. Should be greater than 0. Default value is {@value DEFAULT_POLYLINE_WIDTH}

Companion Object Functions

create

fun create(): PolylineBuilder

Creates a new PolylineBuilder.