Polygon

class Polygon

A Polygon overlay which was added to the map.

See also

TomTomMap.addPolygon(options: PolygonOptions) to check how to configure and add a new Polygon.

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

Parameters

id

Unique Polygon identifier.

Functions

Link copied to clipboard
fun remove()

Removes the Polygon from the map.

Link copied to clipboard
fun updateImage(image: Image)

Updates the Image that will be fitted into the Polygon bounding rectangle.

Properties

Link copied to clipboard
var coordinates: List<GeoCoordinate>

Determines a List of GeoCoordinate elements which create the Polygon.

Link copied to clipboard
var fillColor: Color

The fill Color property of the Polygon.

Link copied to clipboard
val id: UniqueId
Link copied to clipboard
val imageUri: Uri

Provides a Uri of the Image drawn inside the current Polygon.

Link copied to clipboard
var isImageOverlay: Boolean

A Polygon property that determines whether the Image is scaled to cover the whole Polygon. It's false by default, hence the original Image size is preserved and the Image is repeated starting from the South-West corner of the polygons bounding rectangle.

Link copied to clipboard
var isVisible: Boolean

Determines whether the Polygon is visible or hidden.

Link copied to clipboard
var outlineColor: Color

The outline Color property of the Polygon.

Link copied to clipboard
var outlineWidth: Double

The outline width (in dp units) property of the Polygon.