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

PolygonBuilder

class PolygonBuilder

Polygon overlay for the map.

Functions

build

fun build(): Polygon

Create polygon overlay for a given map view.

color

fun color(color: Int): PolygonBuilder

The color in RGBA format of the overlay

coordinate

fun coordinate(coordinate: LatLng): PolygonBuilder

Adds a coordinate to the list of polygon corners.

coordinates

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

Set list of polygon corners.

id

fun id(id: Long): PolygonBuilder

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

opacity

fun opacity(opacity: Float): PolygonBuilder

Overlay opacity. Must be between 0.0 and 1.0.

outlineColor

fun outlineColor(outlineColor: Int): PolygonBuilder

tag

fun tag(tag: Any): PolygonBuilder

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.

Companion Object Functions

create

fun create(): PolygonBuilder

Creates a new instance of a PolygonBuilder.