MTCircleLayer
public class MTCircleLayer : MTLayer, @unchecked Sendable, Codable
extension MTCircleLayer: Equatable
The circle style layer renders one or more filled circles on the map.
-
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?
-
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?
-
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?
-
Circle color can be a constant or an expression.
Declaration
Swift
public var circleColor: MTStyleValue? -
Circle radius can be a constant or an expression.
Declaration
Swift
public var circleRadius: MTStyleValue? -
Filter expression to be embedded inline in layer JSON.
Declaration
Swift
public var filterExpression: MTPropertyValue? -
Optional filter to apply to this layer.
Declaration
Swift
public var filter: MTPropertyValue?
-
Initializes the layer with unique identifier and source identifier.
Declaration
Swift
public init( identifier: String, sourceIdentifier: String ) -
init(identifier:sourceIdentifier: maxZoom: minZoom: sourceLayer: blur: color: opacity: radius: strokeColor: strokeOpacity: strokeWidth: translate: translateAnchor: sortKey: visibility: ) Initializes the layer with all options.
Declaration
Swift
public init( identifier: String, sourceIdentifier: String, maxZoom: Double? = nil, minZoom: Double? = nil, sourceLayer: String? = nil, blur: Double? = 0.0, color: MTStyleValue? = nil, opacity: Double? = 1.0, radius: MTStyleValue? = nil, strokeColor: UIColor? = .black, strokeOpacity: Double? = 1.0, strokeWidth: Double? = 0.0, translate: [Double]? = [0.0, 0.0], translateAnchor: MTCircleTranslateAnchor? = .map, sortKey: Double? = nil, visibility: MTLayerVisibility? = .visible )
-
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)
-
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) -> SelfParameters
valueSort 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) -> SelfParameters
exprExpression to drive circle color.
-
Sets a circle radius expression (e.g., step).
Declaration
Swift
@discardableResult public func paintRadiusExpression(_ expr: MTPropertyValue) -> SelfParameters
exprExpression to drive circle radius.
-
Sets a constant circle color value.
Declaration
Swift
@discardableResult public func paintColor(_ color: UIColor) -> SelfParameters
colorUIColor value.
-
Sets a constant circle radius value in pixels.
Declaration
Swift
@discardableResult public func paintRadius(_ value: Double) -> SelfParameters
valueRadius in pixels.
-
Declaration
Swift
public static func == (lhs: MTCircleLayer, rhs: MTCircleLayer) -> Bool