PolygonOptions

data class PolygonOptions(val coordinates: List<GeoPoint>, @ColorInt val outlineColor: Int = Color.TRANSPARENT, @FloatRange(from = 0.0) val outlineWidth: Double = DEFAULT_OUTLINE_WIDTH, @ColorInt val fillColor: Int = DEFAULT_FILL_COLOR, val image: Image? = null, val isImageOverlay: Boolean = false, val isClickable: Boolean = true, val tag: String? = null)

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

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

See also

, which describes its properties in a more detailed way.

Constructors

Link copied to clipboard
constructor(coordinates: List<GeoPoint>, @ColorInt outlineColor: Int = Color.TRANSPARENT, @FloatRange(from = 0.0) outlineWidth: Double = DEFAULT_OUTLINE_WIDTH, @ColorInt fillColor: Int = DEFAULT_FILL_COLOR, image: Image? = null, isImageOverlay: Boolean = false, isClickable: Boolean = true, tag: String? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Coordinates of the Polygon.

Link copied to clipboard

Main Color of the Polygon.

Link copied to clipboard
val image: Image? = null

The Image that will be displayed inside of the Polygon.

Link copied to clipboard
val isClickable: Boolean = true

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

Link copied to clipboard
val isImageOverlay: Boolean = false

If true, the Image is scaled to cover the whole polygon. If false, the original size is preserved and is repeated starting from the South-West corner of the polygon's bounding rectangle.

Link copied to clipboard

Outline Color of the Polygon overlay.

Link copied to clipboard

Width of the outline of the Polygon overlay.

Link copied to clipboard
val tag: String? = null

Can be used to identify group of polygons.