MTCircleLayer

public class MTCircleLayer : MTLayer, @unchecked Sendable, Codable
extension MTCircleLayer: Equatable

The circle style layer renders one or more filled circles on the map.

Core properties

  • Unique layer identifier.

    Declaration

    Swift

    public var identifier: String
  • Type of the layer.

    Declaration

    Swift

    public private(set) var type: MTLayerType { get }
  • Identifier of the source to be used for this layer.

    Declaration

    Swift

    public var sourceIdentifier: String
  • The maximum zoom level for the layer. Optional number between 0 and 24. At zoom levels equal to or greater than the maxzoom, the layer will be hidden.

    Declaration

    Swift

    public var maxZoom: Double?
  • The minimum zoom level for the layer. Optional number between 0 and 24. At zoom levels less than the minzoom, the layer will be hidden.

    Declaration

    Swift

    public var minZoom: Double?
  • Layer to use from a vector tile source. Required for vector tile sources; prohibited for all other source types, including GeoJSON sources.

    Declaration

    Swift

    public var sourceLayer: String?

Paint properties

  • Amount to blur the circle. Default 0.

    Declaration

    Swift

    public var blur: Double?
  • The fill color of the circle (constant or expression).

    Declaration

    Swift

    public var color: MTStyleValue?
  • The opacity at which the circle will be drawn. Default 1.

    Declaration

    Swift

    public var opacity: Double?
  • Circle radius in pixels (constant or expression).

    Declaration

    Swift

    public var radius: MTStyleValue?
  • The stroke color of the circle’s outline.

    Declaration

    Swift

    public var strokeColor: UIColor?
  • The opacity of the circle’s outline.

    Declaration

    Swift

    public var strokeOpacity: Double?
  • The width of the circle’s outline in pixels.

    Declaration

    Swift

    public var strokeWidth: Double?
  • The geometry’s offset. Values are [x, y] where negatives indicate left and up.

    Declaration

    Swift

    public var translate: [Double]?
  • Controls the frame of reference for translate.

    Declaration

    Swift

    public var translateAnchor: MTCircleTranslateAnchor?
  • Orientation of circle when map is pitched. Defaults to “viewport”.

    Declaration

    Swift

    public var pitchAlignment: MTCirclePitchAlignment?
  • Controls scaling behavior of the circle when the map is pitched. Defaults to “map”.

    Declaration

    Swift

    public var pitchScale: MTCirclePitchScale?

Layout properties

  • Feature ordering value. Features with a higher sort key will appear above features with a lower sort key.

    Declaration

    Swift

    public var sortKey: Double?
  • Enum controlling whether this layer is displayed.

    Declaration

    Swift

    public var visibility: MTLayerVisibility?
  • Optional initial filter to apply after the layer is added to the map.

    Declaration

    Swift

    public var initialFilter: MTPropertyValue?

Initial paint expressions (applied after add)

Initializers

Codable

  • Initializes the layer from the decoder.

    Declaration

    Swift

    public required init(from decoder: any Decoder) throws
  • Declaration

    Swift

    public func encode(to encoder: Encoder) throws
  • Adds layer to map DSL style.

    Prefer addLayer(_:) on MTMapView instead.

    Declaration

    Swift

    public func addToMap(_ mapView: MTMapView)

Modifiers (for DSL chaining). Not for external use.

  • Undocumented

    Declaration

    Swift

    @discardableResult
    public func maxZoom(_ value: Double) -> Self
  • Undocumented

    Declaration

    Swift

    @discardableResult
    public func minZoom(_ value: Double) -> Self
  • Undocumented

    Declaration

    Swift

    @discardableResult
    public func sourceLayer(_ value: String) -> Self
  • Undocumented

    Declaration

    Swift

    @discardableResult
    public func blur(_ value: Double) -> Self
  • Undocumented

    Declaration

    Swift

    @discardableResult
    public func color(_ value: UIColor) -> Self
  • Undocumented

    Declaration

    Swift

    @discardableResult
    public func opacity(_ value: Double) -> Self
  • Undocumented

    Declaration

    Swift

    @discardableResult
    public func radius(_ value: Double) -> Self
  • Undocumented

    Declaration

    Swift

    @discardableResult
    public func strokeColor(_ value: UIColor) -> Self
  • Undocumented

    Declaration

    Swift

    @discardableResult
    public func strokeOpacity(_ value: Double) -> Self
  • Undocumented

    Declaration

    Swift

    @discardableResult
    public func strokeWidth(_ value: Double) -> Self
  • Undocumented

    Declaration

    Swift

    @discardableResult
    public func translate(_ value: [Double]) -> Self
  • Undocumented

    Declaration

    Swift

    @discardableResult
    public func translateAnchor(_ value: MTCircleTranslateAnchor) -> Self
  • Sets the sort key for feature ordering.

    Declaration

    Swift

    @discardableResult
    public func sortKey(_ value: Double) -> Self

    Parameters

    value

    Sort key; higher draws above lower.

  • Undocumented

    Declaration

    Swift

    @discardableResult
    public func visibility(_ value: MTLayerVisibility) -> Self
  • Undocumented

    Declaration

    Swift

    @discardableResult
    public func pitchAlignment(_ value: MTCirclePitchAlignment) -> Self
  • Undocumented

    Declaration

    Swift

    @discardableResult
    public func pitchScale(_ value: MTCirclePitchScale) -> Self
  • Undocumented

    Declaration

    Swift

    @discardableResult
    public func withFilter(_ value: MTPropertyValue) -> Self
  • Sets a circle color expression (e.g., step).

    Declaration

    Swift

    @discardableResult
    public func paintColorExpression(_ expr: MTPropertyValue) -> Self

    Parameters

    expr

    Expression to drive circle color.

  • Sets a circle radius expression (e.g., step).

    Declaration

    Swift

    @discardableResult
    public func paintRadiusExpression(_ expr: MTPropertyValue) -> Self

    Parameters

    expr

    Expression to drive circle radius.

  • Sets a constant circle color value.

    Declaration

    Swift

    @discardableResult
    public func paintColor(_ color: UIColor) -> Self

    Parameters

    color

    UIColor value.

  • Sets a constant circle radius value in pixels.

    Declaration

    Swift

    @discardableResult
    public func paintRadius(_ value: Double) -> Self

    Parameters

    value

    Radius in pixels.

  • Declaration

    Swift

    public static func == (lhs: MTCircleLayer, rhs: MTCircleLayer) -> Bool