MTFillExtrusionLayer

@Serializable
class MTFillExtrusionLayer : MTLayer

A fill-extrusion style layer renders one or more filled (and optionally stroked) extruded (3D) polygons on a map.

You can use a fill-extrusion layer to configure the extrusion and visual appearance of polygon or multipolygon features.

Constructors

constructor(identifier: String, sourceIdentifier: String)
constructor(identifier: String, sourceIdentifier: String, maxZoom: Double, minZoom: Double, sourceLayer: String)
constructor(identifier: String, type: MTLayerType, sourceIdentifier: String, maxZoom: Double?, minZoom: Double?, sourceLayer: String?, base: Double?, color: Int?, height: Double?, opacity: Double?, pattern: String?, translate: DoubleArray?, translateAnchor: MTFillExtrusionTranslateAnchor?, verticalGradient: Boolean?, visibility: MTLayerVisibility)

Properties

var base: Double?

The height with which to extrude the base of this layer. Units in meters. Must be ≤ height. Defaults to 0. Requires height.

@Serializable(with = ColorAsHexSerializer::class)
var color: Int?

The base color of the extruded fill. Defaults to black. Note: If specified as rgba with alpha, alpha is ignored; use opacity.

The height with which to extrude this layer. Units in meters. Defaults to 0.

@SerialName(value = "id")
open override var identifier: String

Unique layer identifier.

@SerialName(value = "maxzoom")
open override var maxZoom: Double?

The maximum zoom level for the layer. Optional number between 0 and 24.

@SerialName(value = "minzoom")
open override var minZoom: Double?

The minimum zoom level for the layer. Optional number between 0 and 24.

The opacity of the entire fill extrusion layer. Optional number between 0 and 1 inclusive. Defaults to 1.

Name of image in sprite to use for drawing images on extruded fills.

@SerialName(value = "source")
open override var sourceIdentifier: String

Identifier of the source to be used for this layer.

@SerialName(value = "source-layer")
open override var sourceLayer: String?

Vector tile source layer name, if applicable. Required for vector tile sources.

The geometry’s offset. Units in pixels. Values are x, y where negatives indicate left and up, respectively. Defaults to 0,0.

Controls the frame of reference for translate. Defaults to map.

open override var type: MTLayerType

Type of the layer.

Whether to apply a vertical gradient to the sides of a fill-extrusion layer. Defaults to true.

Whether this layer is displayed.