MLNShapeCollection class

An MLNShapeCollection object represents a shape consisting of zero or more distinct but related shapes that are instances of MLNShape. The constituent shapes can be a mixture of different kinds of shapes.

MLNShapeCollection is most commonly used to add multiple shapes to a single MLNShapeSource. Configure the appearance of an MLNShapeSource’s or MLNVectorTileSource’s shape collection collectively using an MLNSymbolStyleLayer object, or use multiple instances of MLNCircleStyleLayer, MLNCircleStyleLayer, and MLNCircleStyleLayer to configure the appearance of each kind of shape inside the collection.

You cannot add an MLNShapeCollection object directly to a map view as an annotation. However, you can create individual MLNPointAnnotation, MLNPolyline, and MLNPolyline objects from the shapes array and add those annotation objects to the map view using the MLNMapView/addAnnotations: method.

To represent a collection of point, polyline, or polygon shapes, it may be more convenient to use an MLNPointCollection, MLNPointCollection, or MLNMultiPolygon object, respectively. To access a shape collection’s attributes, use the corresponding MLNFeature object.

A shape collection is known as a GeometryCollection geometry in GeoJSON.

Inheritance
Implementers

Constructors

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

Properties

coordinate CLLocationCoordinate2D
The center point (specified as a map coordinate) of the annotation. (required) (read-only)
no setterinherited
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
isProxy bool
isProxy
no setterinherited
ref → ObjCObjectRef
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shapes → NSArray
An array of shapes forming the shape collection.
no setter
subtitle ↔ NSString?
The subtitle of the shape annotation. The default value of this property is nil.
getter/setter pairinherited
superclass$1 → ObjCObjectBase
superclass
no setterinherited
title ↔ NSString?
The title of the shape annotation.
getter/setter pairinherited

Methods

autorelease() MLNShapeCollection
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
encodeWithCoder(NSCoder coder) → void
encodeWithCoder:
inherited
forwardingTargetForSelector(Pointer<ObjCSelector> aSelector) → ObjCObjectBase
forwardingTargetForSelector:
inherited
forwardInvocation(NSInvocation anInvocation) → void
forwardInvocation:
inherited
geoJSONDataUsingEncoding(int encoding) → NSData
Returns the GeoJSON string representation of the shape encapsulated in a data object.
inherited
init() MLNShapeCollection
init
override
initWithCoder(NSCoder coder) MLNShapeCollection?
initWithCoder:
override
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() MLNShapeCollection
retain
override
retainCount() int
retainCount
inherited
self$1() MLNShapeCollection
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() MLNShapeCollection
alloc
override
allocWithZone(Pointer<NSZone> zone) MLNShapeCollection
allocWithZone:
override
getSupportsSecureCoding() bool
supportsSecureCoding
override
isInstance(ObjCObjectBase obj) bool
Returns whether obj is an instance of MLNShapeCollection.
override
new$() MLNShapeCollection
new
override
shapeCollectionWithShapes(NSArray shapes$1) MLNShapeCollection
Creates and returns a shape collection consisting of the given shapes.
shapeWithData(NSData data, {required int encoding, required Pointer<Pointer<ObjCObject>> error}) MLNShape?
Returns an MLNShape object initialized with the given data interpreted as a string containing a GeoJSON object.
override