MLNLineStyleLayer class

An MLNLineStyleLayer is a style layer that renders one or more stroked polylines on the map.

Use a line style layer to configure the visual appearance of polyline or multipolyline features. These features can come from vector tiles loaded by an MLNLineStyleLayer object, or they can be MLNLineStyleLayer, MLNLineStyleLayer, MLNLineStyleLayer, or MLNLineStyleLayer instances in an MLNLineStyleLayer or MLNLineStyleLayer object.

You can access an existing line style layer using the MLNStyle/layerWithIdentifier: method if you know its identifier; otherwise, find it using the MLNStyle/layers property. You can also create a new line style layer and add it to the style using a method such as MLNStyle/addLayer:.

See the Add multiple shapes from a single shape source example to learn how to add a line to your map using this style layer. See the Add a line style layer from GeoJSON example to learn how to add and style line data to an MLNMapView object at runtime.

Example

Inheritance

Constructors

MLNLineStyleLayer()
Returns a new instance of MLNLineStyleLayer constructed with the default new method.
factory
MLNLineStyleLayer.castFrom(ObjCObjectBase other)
Constructs a MLNLineStyleLayer that points to the same underlying object as other.
MLNLineStyleLayer.castFromPointer(Pointer<ObjCObject> other, {bool retain = false, bool release = false})
Constructs a MLNLineStyleLayer that wraps the given raw object pointer.

Properties

debugDescription$1 → NSString
debugDescription
no setterinherited
description$1 → NSString
description
no setterinherited
hash$1 int
hash
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
identifier → NSString
A string that uniquely identifies the style layer in the style to which it is added.
no setterinherited
isProxy bool
isProxy
no setterinherited
lineBlur NSExpression
Blur applied to the line, in points.
getter/setter pair
lineBlurTransition MLNTransition
The transition affecting any changes to this layer’s lineBlur property.
getter/setter pair
lineCap NSExpression
The display of line endings.
getter/setter pair
lineColor NSExpression
The color with which the line will be drawn.
getter/setter pair
lineColorTransition MLNTransition
The transition affecting any changes to this layer’s lineColor property.
getter/setter pair
lineDasharray NSExpression
lineDasharray
getter/setter pair
lineDashPattern NSExpression
Specifies the lengths of the alternating dashes and gaps that form the dash pattern. The lengths are later scaled by the line width. To convert a dash length to points, multiply the length by the current line width. Note that GeoJSON sources with lineMetrics: true specified won't render dashed lines to the expected scale. Also note that zoom-dependent expressions will be evaluated only at integer zoom levels.
getter/setter pair
lineDashPatternTransition MLNTransition
The transition affecting any changes to this layer’s lineDashPattern property.
getter/setter pair
lineGapWidth NSExpression
Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.
getter/setter pair
lineGapWidthTransition MLNTransition
The transition affecting any changes to this layer’s lineGapWidth property.
getter/setter pair
lineGradient NSExpression
The color gradient with which the line will be drawn. This property only has an effect on lines defined by an MLNShapeSource whose MLNShapeSource option is set to YES.
getter/setter pair
lineJoin NSExpression
The display of lines when joining.
getter/setter pair
lineMiterLimit NSExpression
Used to automatically convert miter joins to bevel joins for sharp angles.
getter/setter pair
lineOffset NSExpression
The line's offset. For linear features, a positive value offsets the line to the right, relative to the direction of the line, and a negative value to the left. For polygon features, a positive value results in an inset, and a negative value results in an outset.
getter/setter pair
lineOffsetTransition MLNTransition
The transition affecting any changes to this layer’s lineOffset property.
getter/setter pair
lineOpacity NSExpression
The opacity at which the line will be drawn.
getter/setter pair
lineOpacityTransition MLNTransition
The transition affecting any changes to this layer’s lineOpacity property.
getter/setter pair
linePattern NSExpression
Name of image in style images to use for drawing image lines. For seamless patterns, image width must be a factor of two (2, 4, 8, ..., 512).
getter/setter pair
linePatternTransition MLNTransition
The transition affecting any changes to this layer’s linePattern property.
getter/setter pair
lineRoundLimit NSExpression
Used to automatically convert round joins to miter joins for shallow angles.
getter/setter pair
lineSortKey NSExpression
Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.
getter/setter pair
lineTranslate NSExpression
lineTranslate
getter/setter pair
lineTranslateAnchor NSExpression
lineTranslateAnchor
getter/setter pair
lineTranslation NSExpression
The geometry's offset.
getter/setter pair
lineTranslationAnchor NSExpression
Controls the frame of reference for lineTranslation.
getter/setter pair
lineTranslationTransition MLNTransition
The transition affecting any changes to this layer’s lineTranslation property.
getter/setter pair
lineWidth NSExpression
Stroke thickness.
getter/setter pair
lineWidthTransition MLNTransition
The transition affecting any changes to this layer’s lineWidth property.
getter/setter pair
maximumZoomLevel double
The maximum zoom level at which the layer gets parsed and appears. This value is a floating-point number.
getter/setter pairinherited
minimumZoomLevel double
The minimum zoom level at which the layer gets parsed and appears. This value is a floating-point number.
getter/setter pairinherited
predicate NSPredicate?
The style layer’s predicate.
getter/setter pairinherited
ref → ObjCObjectRef
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sourceIdentifier → NSString?
Identifier of the source from which the receiver obtains the data to style.
no setterinherited
sourceLayerIdentifier ↔ NSString?
Identifier of the layer within the source identified by the sourceIdentifier property from which the receiver obtains the data to style.
getter/setter pairinherited
superclass$1 → ObjCObjectBase
superclass
no setterinherited
visible bool
Whether this layer is displayed. A value of NO hides the layer.
getter/setter pairinherited

Methods

autorelease() MLNLineStyleLayer
autorelease
override
class$1() → ObjCObjectBase
class
inherited
conformsToProtocol$1(Protocol aProtocol) bool
conformsToProtocol:
inherited
copy() → ObjCObjectBase
copy
inherited
dealloc() → void
dealloc
inherited
doesNotRecognizeSelector(Pointer<ObjCSelector> aSelector) → void
doesNotRecognizeSelector:
inherited
forwardingTargetForSelector(Pointer<ObjCSelector> aSelector) → ObjCObjectBase
forwardingTargetForSelector:
inherited
forwardInvocation(NSInvocation anInvocation) → void
forwardInvocation:
inherited
init() MLNLineStyleLayer
init
override
initWithIdentifier(NSString identifier, {required MLNSource source}) MLNLineStyleLayer
Returns a line style layer initialized with an identifier and source.
isEqual(ObjCObjectBase object) bool
isEqual:
inherited
isKindOfClass(ObjCObjectBase aClass) bool
isKindOfClass:
inherited
isMemberOfClass(ObjCObjectBase aClass) bool
isMemberOfClass:
inherited
methodForSelector(Pointer<ObjCSelector> aSelector) Pointer<NativeFunction<Void Function()>>
methodForSelector:
inherited
methodSignatureForSelector(Pointer<ObjCSelector> aSelector) → NSMethodSignature
methodSignatureForSelector:
inherited
mutableCopy() → ObjCObjectBase
mutableCopy
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
performSelector(Pointer<ObjCSelector> aSelector) → ObjCObjectBase
performSelector:
inherited
performSelector$1(Pointer<ObjCSelector> aSelector, {required ObjCObjectBase withObject}) → ObjCObjectBase
performSelector:withObject:
inherited
performSelector$2(Pointer<ObjCSelector> aSelector, {required ObjCObjectBase withObject, required ObjCObjectBase withObject$1}) → ObjCObjectBase
performSelector:withObject:withObject:
inherited
release() → void
release
inherited
respondsToSelector(Pointer<ObjCSelector> aSelector) bool
respondsToSelector:
inherited
retain() MLNLineStyleLayer
retain
override
retainCount() int
retainCount
inherited
self$1() MLNLineStyleLayer
self
override
toString() String
A string representation of this object.
inherited
zone() Pointer<NSZone>
zone
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

alloc() MLNLineStyleLayer
alloc
override
allocWithZone(Pointer<NSZone> zone) MLNLineStyleLayer
allocWithZone:
override
isInstance(ObjCObjectBase obj) bool
Returns whether obj is an instance of MLNLineStyleLayer.
override
new$() MLNLineStyleLayer
new
override