MLNCluster class interface
A protocol that feature subclasses (i.e. those already conforming to
the MLNFeature protocol) conform to if they represent clusters.
Currently the only class that conforms to MLNCluster is
MLNPointFeatureCluster (a subclass of MLNPointFeatureCluster).
To check if a feature is a cluster, check conformity to MLNCluster, for
example:
let shape = try! MLNShape(data: clusterShapeData, encoding: String.Encoding.utf8.rawValue)
guard let pointFeature = shape as? MLNPointFeature else {
throw ExampleError.unexpectedFeatureType
}
// Check for cluster conformance
guard let cluster = pointFeature as? MLNCluster else {
throw ExampleError.featureIsNotACluster
}
// Currently the only supported class that conforms to ``MLNCluster`` is
// ``MLNPointFeatureCluster``
guard cluster is MLNPointFeatureCluster else {
throw ExampleError.unexpectedFeatureType
}
- Implemented types
- Implementers
Constructors
- MLNCluster.castFrom(ObjCObjectBase other)
- 
          Constructs a MLNCluster that points to the same underlying object as other.
- 
          MLNCluster.castFromPointer(Pointer<ObjCObject> other, {bool retain = false, bool release = false})
- Constructs a MLNCluster that wraps the given raw object pointer.
Properties
- hashCode → int
- 
  The hash code for this object.
  no setterinherited
- ref → ObjCObjectRef
- 
  
  finalinherited
- runtimeType → Type
- 
  A representation of the runtime type of the object.
  no setterinherited
Methods
- 
  noSuchMethod(Invocation invocation) → dynamic 
- 
  Invoked when a nonexistent method or property is accessed.
  inherited
- 
  toString() → String 
- 
  A string representation of this object.
  inherited
Operators
- 
  operator ==(Object other) → bool 
- 
  The equality operator.
  inherited
Static Properties
- $protocol → Protocol
- 
  Returns the objc.Protocolobject for this protocol.no setter
- 
  attributeForKey_
  → ObjCProtocolMethod<ObjCObjectBase? Function(NSString)> 
- 
  Returns the feature attribute for the given attribute name.
  final
- 
  attributes
  → ObjCProtocolMethod<NSDictionary Function()> 
- 
  A dictionary of attributes for this feature.
  final
- 
  clusterIdentifier
  → ObjCProtocolMethod<int Function()> 
- 
  The identifier for the cluster.
  final
- 
  clusterPointCount
  → ObjCProtocolMethod<int Function()> 
- 
  The number of points within this cluster
  final
- 
  coordinate
  → ObjCProtocolMethod<CLLocationCoordinate2D Function()> 
- 
  The center point (specified as a map coordinate) of the annotation. (required)
(read-only)
  final
- 
  geoJSONDictionary
  → ObjCProtocolMethod<NSDictionary Function()> 
- 
  Returns a dictionary that can be serialized as a GeoJSON Feature representation
of an instance of an MLNFeaturesubclass.final
- 
  identifier
  → ObjCProtocolMethod<ObjCObjectBase? Function()> 
- 
  An object that uniquely identifies the feature in its containing content
source.
  final
- 
  setAttributes_
  → ObjCProtocolListenableMethod<void Function(NSDictionary)> 
- 
  A dictionary of attributes for this feature.
  final
- 
  setIdentifier_
  → ObjCProtocolListenableMethod<void Function(ObjCObjectBase?)> 
- 
  An object that uniquely identifies the feature in its containing content
source.
  final
- 
  subtitle
  → ObjCProtocolMethod<NSString? Function()> 
- 
  The string containing the annotation’s subtitle.
  final
- 
  title
  → ObjCProtocolMethod<NSString? Function()> 
- 
  The string containing the annotation’s title.
  final
Static Methods
- 
  addToBuilder(ObjCProtocolBuilder builder, {required int clusterIdentifier(), required int clusterPointCount(), required ObjCObjectBase? identifier(), required void setIdentifier_(ObjCObjectBase?), required NSDictionary attributes(), required void setAttributes_(NSDictionary), required ObjCObjectBase? attributeForKey_(NSString), required NSDictionary geoJSONDictionary(), required CLLocationCoordinate2D coordinate(), NSString? title()?, NSString? subtitle()?, bool $keepIsolateAlive = true}) → void 
- 
  Adds the implementation of the MLNCluster protocol to an existing
objc.ObjCProtocolBuilder.override
- 
  addToBuilderAsBlocking(ObjCProtocolBuilder builder, {required int clusterIdentifier(), required int clusterPointCount(), required ObjCObjectBase? identifier(), required void setIdentifier_(ObjCObjectBase?), required NSDictionary attributes(), required void setAttributes_(NSDictionary), required ObjCObjectBase? attributeForKey_(NSString), required NSDictionary geoJSONDictionary(), required CLLocationCoordinate2D coordinate(), NSString? title()?, NSString? subtitle()?, bool $keepIsolateAlive = true}) → void 
- 
  Adds the implementation of the MLNCluster protocol to an existing
objc.ObjCProtocolBuilder. All methods that can be implemented as blocking listeners will be.override
- 
  addToBuilderAsListener(ObjCProtocolBuilder builder, {required int clusterIdentifier(), required int clusterPointCount(), required ObjCObjectBase? identifier(), required void setIdentifier_(ObjCObjectBase?), required NSDictionary attributes(), required void setAttributes_(NSDictionary), required ObjCObjectBase? attributeForKey_(NSString), required NSDictionary geoJSONDictionary(), required CLLocationCoordinate2D coordinate(), NSString? title()?, NSString? subtitle()?, bool $keepIsolateAlive = true}) → void 
- 
  Adds the implementation of the MLNCluster protocol to an existing
objc.ObjCProtocolBuilder. All methods that can be implemented as listeners will be.override
- 
  conformsTo(ObjCObjectBase obj) → bool 
- 
  Returns whether objis an instance of MLNCluster.override
- 
  implement({required int clusterIdentifier(), required int clusterPointCount(), required ObjCObjectBase? identifier(), required void setIdentifier_(ObjCObjectBase?), required NSDictionary attributes(), required void setAttributes_(NSDictionary), required ObjCObjectBase? attributeForKey_(NSString), required NSDictionary geoJSONDictionary(), required CLLocationCoordinate2D coordinate(), NSString? title()?, NSString? subtitle()?, bool $keepIsolateAlive = true}) → MLNCluster 
- 
  Builds an object that implements the MLNCluster protocol. To implement
multiple protocols, use addToBuilder or objc.ObjCProtocolBuilderdirectly.override
- 
  implementAsBlocking({required int clusterIdentifier(), required int clusterPointCount(), required ObjCObjectBase? identifier(), required void setIdentifier_(ObjCObjectBase?), required NSDictionary attributes(), required void setAttributes_(NSDictionary), required ObjCObjectBase? attributeForKey_(NSString), required NSDictionary geoJSONDictionary(), required CLLocationCoordinate2D coordinate(), NSString? title()?, NSString? subtitle()?, bool $keepIsolateAlive = true}) → MLNCluster 
- 
  Builds an object that implements the MLNCluster protocol. To implement
multiple protocols, use addToBuilder or objc.ObjCProtocolBuilderdirectly. All methods that can be implemented as blocking listeners will be.override
- 
  implementAsListener({required int clusterIdentifier(), required int clusterPointCount(), required ObjCObjectBase? identifier(), required void setIdentifier_(ObjCObjectBase?), required NSDictionary attributes(), required void setAttributes_(NSDictionary), required ObjCObjectBase? attributeForKey_(NSString), required NSDictionary geoJSONDictionary(), required CLLocationCoordinate2D coordinate(), NSString? title()?, NSString? subtitle()?, bool $keepIsolateAlive = true}) → MLNCluster 
- 
  Builds an object that implements the MLNCluster protocol. To implement
multiple protocols, use addToBuilder or objc.ObjCProtocolBuilderdirectly. All methods that can be implemented as listeners will be.override