Polygon

class Polygon


A representation of a polygon object in a 3D map.

Summary

Public functions

Int

The altitude mode of the polygon, which specifies how altitude components in the coordinates are interpreted

Boolean

Whether parts of the polygon which could be occluded are drawn or not.

Boolean

Whether the polygon is extruded to the ground.

@ColorInt Int

The fill color of the polygon in ARGB format, i.e. 0xffffffff.

Boolean

Whether the polygon edges are interpreted as geodesic and follow the curvature of the Earth.

String!

A read-only unique identifier for this model.

(Mutable)List<Hole!>!

This function is deprecated.

Use getInnerPaths instead.

(Mutable)List<Hole!>!

The inner coordinates of the polygon.

(Mutable)List<LatLngAltitude!>!

This function is deprecated.

Use getPath instead.

(Mutable)List<LatLngAltitude!>!

The outer coordinates of the polygon.

@ColorInt Int

The stroke color of the polygon in ARGB format, i.e. 0xffffffff

Double

The stroke width of the polygon in pixels.

Int

The draw order of the polygon.

Unit

Removes this polygon from the 3d map scene.

Unit

Sets the altitude mode of the polygon.

Unit

Sets the listener for click events on the model.

Unit

Sets whether parts of the polygon which could be occluded are drawn or not.

Unit

Sets whether the polygon is extruded to the ground.

Unit

Sets the fill color of the polygon in ARGB format, i.e. 0xffffffff.

Unit

Sets whether the polygon edges are interpreted as geodesic and follow the curvature of the Earth.

Unit

This function is deprecated.

Use setInnerPaths instead.

Unit

Sets the inner coordinates of the polygon.

Unit

This function is deprecated.

Use setPath instead.

Unit

Sets the outer coordinates of the polygon.

Unit

Sets the stroke color of the polygon in ARGB format, i.e. 0xffffffff

Unit

Sets the stroke width of the polygon in pixels.

Unit
setZIndex(value: Int)

Sets the draw order of the polygon.

Public functions

getAltitudeMode

@AltitudeMode
fun getAltitudeMode(): Int

The altitude mode of the polygon, which specifies how altitude components in the coordinates are interpreted

getDrawsOccludedSegments

fun getDrawsOccludedSegments(): Boolean

Whether parts of the polygon which could be occluded are drawn or not. Polygons can be occluded by map geometry (e.g. buildings).

getExtruded

fun getExtruded(): Boolean

Whether the polygon is extruded to the ground. To extrude a polygon, the altitude mode must be either relativeToGround or absolute.

getFillColor

fun getFillColor(): @ColorInt Int

The fill color of the polygon in ARGB format, i.e. 0xffffffff.

getGeodesic

fun getGeodesic(): Boolean

Whether the polygon edges are interpreted as geodesic and follow the curvature of the Earth. When false, edges of the polygon are rendered as straight lines in screen space.

getId

fun getId(): String!

A read-only unique identifier for this model. This will assigned during creation and will be used to identify the polygon when updating or removing it.

getInnerCoordinates

fun getInnerCoordinates(): (Mutable)List<Hole!>!

The inner coordinates of the polygon. A Polygon can contain multiple inner coordinates, which create multiple cut-outs inside the polygon.

getInnerPaths

fun getInnerPaths(): (Mutable)List<Hole!>!

The inner coordinates of the polygon. A Polygon can contain multiple inner coordinates, which create multiple cut-outs inside the polygon.

getOuterCoordinates

fun getOuterCoordinates(): (Mutable)List<LatLngAltitude!>!

The outer coordinates of the polygon.

getPath

fun getPath(): (Mutable)List<LatLngAltitude!>!

The outer coordinates of the polygon.

getStrokeColor

fun getStrokeColor(): @ColorInt Int

The stroke color of the polygon in ARGB format, i.e. 0xffffffff

getStrokeWidth

fun getStrokeWidth(): Double

The stroke width of the polygon in pixels.

getZIndex

fun getZIndex(): Int

The draw order of the polygon.

remove

fun remove(): Unit

Removes this polygon from the 3d map scene.

setAltitudeMode

fun setAltitudeMode(@AltitudeMode value: Int): Unit

Sets the altitude mode of the polygon.

setClickListener

fun setClickListener(listener: OnPolygonClickListener?): Unit

Sets the listener for click events on the model.

setDrawsOccludedSegments

fun setDrawsOccludedSegments(value: Boolean): Unit

Sets whether parts of the polygon which could be occluded are drawn or not. Polygons can be occluded by map geometry (e.g. buildings).

setExtruded

fun setExtruded(value: Boolean): Unit

Sets whether the polygon is extruded to the ground. To extrude a polygon, the altitude mode must be either relativeToGround or absolute.

setFillColor

fun setFillColor(value: @ColorInt Int): Unit

Sets the fill color of the polygon in ARGB format, i.e. 0xffffffff.

setGeodesic

fun setGeodesic(value: Boolean): Unit

Sets whether the polygon edges are interpreted as geodesic and follow the curvature of the Earth. When false, edges of the polygon are rendered as straight lines in screen space.

setInnerCoordinates

fun setInnerCoordinates(value: (Mutable)List<Hole!>!): Unit

Sets the inner coordinates of the polygon.

setInnerPaths

fun setInnerPaths(value: (Mutable)List<Hole!>!): Unit

Sets the inner coordinates of the polygon.

setOuterCoordinates

fun setOuterCoordinates(value: (Mutable)List<LatLngAltitude!>!): Unit

Sets the outer coordinates of the polygon.

setPath

fun setPath(value: (Mutable)List<LatLngAltitude!>!): Unit

Sets the outer coordinates of the polygon.

setStrokeColor

fun setStrokeColor(value: @ColorInt Int): Unit

Sets the stroke color of the polygon in ARGB format, i.e. 0xffffffff

setStrokeWidth

fun setStrokeWidth(value: Double): Unit

Sets the stroke width of the polygon in pixels.

setZIndex

fun setZIndex(value: Int): Unit

Sets the draw order of the polygon.