MMKMapObjectCollection

@interface MMKMapObjectCollection : MMKBaseMapObjectCollection

A collection of map objects that can hold any set of MapObject items, including nested collections.

Summary

Instance methods

- (nonnull MMKPlacemarkMapObject *)addPlacemark;
Creates a new empty placemark and adds it to the current collection

- (nonnull MMKPlacemarkMapObject *)addPlacemarkWithPlacemarkCreatedCallback:
    (nonnull MMKPlacemarkCreatedCallback)placemarkCreatedCallback;

Creates a new empty placemark and adds it to the current collection

- (nonnull MMKPlacemarkMapObject *)addEmptyPlacemarkWithPoint:
    (nonnull MMKPoint *)point;

Creates a new empty placemark and adds it to the current collection

- (nonnull MMKPlacemarkMapObject *)addPlacemarkWithPoint:
    (nonnull MMKPoint *)point;

Creates a new placemark with the default icon and style, and adds it to the current collection

- (nonnull MMKPlacemarkMapObject *)
    addPlacemarkWithPoint:(nonnull MMKPoint *)point
                    image:(nonnull UIImage *)image;

Creates a new placemark with the default style and adds it to the current collection

- (nonnull MMKPlacemarkMapObject *)
    addPlacemarkWithPoint:(nonnull MMKPoint *)point
                    image:(nonnull UIImage *)image
                    style:(nonnull MMKIconStyle *)style;

Creates a new placemark and adds it to the current collection

- (nonnull MMKPlacemarkMapObject *)
    addPlacemarkWithPoint:(nonnull MMKPoint *)point
                     view:(nonnull MRTViewProvider *)view;

Creates a new view placemark with default style and adds it to the current collection

- (nonnull MMKPlacemarkMapObject *)
    addPlacemarkWithPoint:(nonnull MMKPoint *)point
                     view:(nonnull MRTViewProvider *)view
                    style:(nonnull MMKIconStyle *)style;

Creates a new view placemark and adds it to the current collection

- (nonnull MMKPlacemarkMapObject *)
    addPlacemarkWithPoint:(nonnull MMKPoint *)point
            animatedImage:(nonnull id<MRTAnimatedImageProvider>)animatedImage
                    style:(nonnull MMKIconStyle *)style;

Creates a new placemark with animated icon and adds it to the current collection

- (nonnull NSArray<MMKPlacemarkMapObject *> *)
    addPlacemarksWithPoints:(nonnull NSArray<MMKPoint *> *)points
                      image:(nonnull UIImage *)image
                      style:(nonnull MMKIconStyle *)style;

Creates new placemarks and adds them to the current collection

- (nonnull NSArray<MMKPlacemarkMapObject *> *)addEmptyPlacemarksWithPoints:
    (nonnull NSArray<MMKPoint *> *)points;

Creates new empty placemarks and adds them to the current collection

- (nonnull MMKPolylineMapObject *)addPolylineWithPolyline:
    (nonnull MMKPolyline *)polyline;

Creates a new polyline and adds it to the current collection

- (nonnull MMKPolylineMapObject *)addPolyline;
Creates a new polyline with an empty geometry and adds it to the current collection

- (nonnull MMKPolygonMapObject *)addPolygonWithPolygon:
    (nonnull MMKPolygon *)polygon;

Creates a new polygon and adds it to the current collection

- (nonnull MMKCircleMapObject *)addCircleWithCircle:(nonnull MMKCircle *)circle;
Creates a new circle and adds it to the current collection

- (nonnull MMKMapObjectCollection *)addCollection;
Creates a new nested collection of map objects

- (nonnull MMKClusterizedPlacemarkCollection *)
    addClusterizedPlacemarkCollectionWithClusterListener:
        (nonnull id<MMKClusterListener>)clusterListener;

Creates a new nested collection of clusterized placemarks

- (nonnull MMKPlacemarksStyler *)placemarksStyler;
A styler for all placemarks in this collection, including placemarks in child collections

Instance methods

addPlacemark

- (nonnull MMKPlacemarkMapObject *)addPlacemark;

Creates a new empty placemark and adds it to the current collection.


addPlacemarkWithPlacemarkCreatedCallback:

- (nonnull MMKPlacemarkMapObject *)addPlacemarkWithPlacemarkCreatedCallback:
    (nonnull MMKPlacemarkCreatedCallback)placemarkCreatedCallback;

Creates a new empty placemark and adds it to the current collection. Callback can be used to setup placemark style and position Callback will be called before MapObjectCollectionListener#onMapObjectAdded


addEmptyPlacemarkWithPoint:

- (nonnull MMKPlacemarkMapObject *)addEmptyPlacemarkWithPoint:
    (nonnull MMKPoint *)point;

Creates a new empty placemark and adds it to the current collection.

Alert

Use addPlacemark() + setGeometry(point)


addPlacemarkWithPoint:

- (nonnull MMKPlacemarkMapObject *)addPlacemarkWithPoint:
    (nonnull MMKPoint *)point;

Creates a new placemark with the default icon and style, and adds it to the current collection.

Alert

Use addPlacemark() + setGeometry(point) + setIcon(your_own_blue_dot_icon). Default icon (also known as blue dot) is no longer provided.


addPlacemarkWithPoint:image:

- (nonnull MMKPlacemarkMapObject *)
    addPlacemarkWithPoint:(nonnull MMKPoint *)point
                    image:(nonnull UIImage *)image;

Creates a new placemark with the default style and adds it to the current collection.

Alert

Use addPlacemark() + setGeometry(point) + setIcon(image, style)


addPlacemarkWithPoint:image:style:

- (nonnull MMKPlacemarkMapObject *)
    addPlacemarkWithPoint:(nonnull MMKPoint *)point
                    image:(nonnull UIImage *)image
                    style:(nonnull MMKIconStyle *)style;

Creates a new placemark and adds it to the current collection. Hint: to add a large amount of placemarks use addPlacemarks method.

Alert

Use addPlacemark() + setGeometry(point) + setIcon(image, style)


addPlacemarkWithPoint:view:

- (nonnull MMKPlacemarkMapObject *)
    addPlacemarkWithPoint:(nonnull MMKPoint *)point
                     view:(nonnull MRTViewProvider *)view;

Creates a new view placemark with default style and adds it to the current collection.

Alert

Use addPlacemark() + setGeometry(point) + setView(view)


addPlacemarkWithPoint:view:style:

- (nonnull MMKPlacemarkMapObject *)
    addPlacemarkWithPoint:(nonnull MMKPoint *)point
                     view:(nonnull MRTViewProvider *)view
                    style:(nonnull MMKIconStyle *)style;

Creates a new view placemark and adds it to the current collection.

Alert

Use addPlacemark() + setGeometry(point) + setView(view, style)


addPlacemarkWithPoint:animatedImage:style:

- (nonnull MMKPlacemarkMapObject *)
    addPlacemarkWithPoint:(nonnull MMKPoint *)point
            animatedImage:(nonnull id<MRTAnimatedImageProvider>)animatedImage
                    style:(nonnull MMKIconStyle *)style;

Creates a new placemark with animated icon and adds it to the current collection.

Alert

Use addPlacemark() + setGeometry(point) + useAnimation() + setIcon(animatedImage, style)


addPlacemarksWithPoints:image:style:

- (nonnull NSArray<MMKPlacemarkMapObject *> *)
    addPlacemarksWithPoints:(nonnull NSArray<MMKPoint *> *)points
                      image:(nonnull UIImage *)image
                      style:(nonnull MMKIconStyle *)style;

Creates new placemarks and adds them to the current collection. Relevant for Android: this method provides better performance for adding a large number of placemarks than multiple calls of addPlacemark.

Alert

Use ClusterizedPlacemarkCollection


addEmptyPlacemarksWithPoints:

- (nonnull NSArray<MMKPlacemarkMapObject *> *)addEmptyPlacemarksWithPoints:
    (nonnull NSArray<MMKPoint *> *)points;

Creates new empty placemarks and adds them to the current collection.

Relevant for Android: this method provides better performance for adding a large number of empty placemarks than multiple calls of addEmptyPlacemark.

Alert

Use ClusterizedPlacemarkCollection


addPolylineWithPolyline:

- (nonnull MMKPolylineMapObject *)addPolylineWithPolyline:
    (nonnull MMKPolyline *)polyline;

Creates a new polyline and adds it to the current collection.


addPolyline

- (nonnull MMKPolylineMapObject *)addPolyline;

Creates a new polyline with an empty geometry and adds it to the current collection.


addPolygonWithPolygon:

- (nonnull MMKPolygonMapObject *)addPolygonWithPolygon:
    (nonnull MMKPolygon *)polygon;

Creates a new polygon and adds it to the current collection.


addCircleWithCircle:

- (nonnull MMKCircleMapObject *)addCircleWithCircle:(nonnull MMKCircle *)circle;

Creates a new circle and adds it to the current collection.


addCollection

- (nonnull MMKMapObjectCollection *)addCollection;

Creates a new nested collection of map objects.


addClusterizedPlacemarkCollectionWithClusterListener:

- (nonnull MMKClusterizedPlacemarkCollection *)
    addClusterizedPlacemarkCollectionWithClusterListener:
        (nonnull id<MMKClusterListener>)clusterListener;

Creates a new nested collection of clusterized placemarks.

The class does not retain the object in the 'clusterListener' parameter. It is your responsibility to maintain a strong reference to the target object while it is attached to a class.

Parameters

clusterListener

Listener that controls cluster appearance once they are added to the map.


placemarksStyler

- (nonnull MMKPlacemarksStyler *)placemarksStyler;

A styler for all placemarks in this collection, including placemarks in child collections.