Class YMKMapObjectCollection

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

Instance Methods

- addCircleWithCircle:strokeColor:strokeWidth:fillColor:

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

- addClusterizedPlacemarkCollectionWithClusterListener:

Creates a new nested collection of clusterized placemarks.

- addCollection

Creates a new nested collection of map objects.

- addColoredPolyline

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

- addColoredPolylineWithPolyline:

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

- addEmptyPlacemarksWithPoints:

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

- addEmptyPlacemarkWithPoint:

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

- addListenerWithCollectionListener:

Adds a listener to track notifications of changes to the collection.

- addPlacemarksWithPoints:image:style:

Creates new placemarks and adds them to the current collection.

- addPlacemarkWithPoint:

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

- addPlacemarkWithPoint:animatedImage:style:

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

- addPlacemarkWithPoint:animatedModel:style:

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

- addPlacemarkWithPoint:image:

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

- addPlacemarkWithPoint:image:style:

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

- addPlacemarkWithPoint:view:

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

- addPlacemarkWithPoint:view:style:

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

- addPolygonWithPolygon:

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

- addPolylineWithPolyline:

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

- clear

Removes all map objects from the collection.

- placemarksStyler

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

- removeWithMapObject:

Removes the given map object from the collection.

- traverseWithMapObjectVisitor:

Traverses through the collection with a visitor object.

Method Detail

-addCircleWithCircle:strokeColor:strokeWidth:fillColor:

- (nonnull YMKCircleMapObject *)addCircleWithCircle:(nonnull YMKCircle *)circle
                                        strokeColor:(nonnull UIColor *)strokeColor
                                        strokeWidth:(float)strokeWidth
                                          fillColor:(nonnull UIColor *)fillColor 

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

-addClusterizedPlacemarkCollectionWithClusterListener:

- (nonnull YMKClusterizedPlacemarkCollection *)addClusterizedPlacemarkCollectionWithClusterListener:(nonnull id< YMKClusterListener >)clusterListener 

Creates a new nested collection of clusterized placemarks.

Parameters:
clusterListener

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

-addCollection

- (nonnull YMKMapObjectCollection *)addCollection

Creates a new nested collection of map objects.

-addColoredPolyline

- (nonnull YMKColoredPolylineMapObject *)addColoredPolyline

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

-addColoredPolylineWithPolyline:

- (nonnull YMKColoredPolylineMapObject *)addColoredPolylineWithPolyline:(nonnull YMKPolyline *)polyline 

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

-addEmptyPlacemarkWithPoint:

- (nonnull YMKPlacemarkMapObject *)addEmptyPlacemarkWithPoint:(nonnull YMKPoint *)point 

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

Hint: to add a large amount of empty placemarks use addEmptyPlacemarks method.

-addEmptyPlacemarksWithPoints:

- (nonnull NSArray< YMKPlacemarkMapObject * > *)addEmptyPlacemarksWithPoints:(nonnull NSArray< YMKPoint * > *)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.

-addListenerWithCollectionListener:

- (void)addListenerWithCollectionListener:(nonnull id< YMKMapObjectCollectionListener >)collectionListener 

Adds a listener to track notifications of changes to the collection.

-addPlacemarkWithPoint:

- (nonnull YMKPlacemarkMapObject *)addPlacemarkWithPoint:(nonnull YMKPoint *)point 

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

-addPlacemarkWithPoint:animatedImage:style:

- (nonnull YMKPlacemarkMapObject *)addPlacemarkWithPoint:(nonnull YMKPoint *)point
                                           animatedImage:(nonnull id< YRTAnimatedImageProvider >)animatedImage
                                                   style:(nonnull YMKIconStyle *)style 

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

-addPlacemarkWithPoint:animatedModel:style:

- (nonnull YMKPlacemarkMapObject *)addPlacemarkWithPoint:(nonnull YMKPoint *)point
                                           animatedModel:(nonnull id< YRTAnimatedModelProvider >)animatedModel
                                                   style:(nonnull YMKModelStyle *)style 

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

-addPlacemarkWithPoint:image:

- (nonnull YMKPlacemarkMapObject *)addPlacemarkWithPoint:(nonnull YMKPoint *)point
                                                   image:(nonnull UIImage *)image 

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

-addPlacemarkWithPoint:image:style:

- (nonnull YMKPlacemarkMapObject *)addPlacemarkWithPoint:(nonnull YMKPoint *)point
                                                   image:(nonnull UIImage *)image
                                                   style:(nonnull YMKIconStyle *)style 

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

Hint: to add a large amount of placemarks use addPlacemarks method.

-addPlacemarkWithPoint:view:

- (nonnull YMKPlacemarkMapObject *)addPlacemarkWithPoint:(nonnull YMKPoint *)point
                                                    view:(nonnull YRTViewProvider *)view 

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

-addPlacemarkWithPoint:view:style:

- (nonnull YMKPlacemarkMapObject *)addPlacemarkWithPoint:(nonnull YMKPoint *)point
                                                    view:(nonnull YRTViewProvider *)view
                                                   style:(nonnull YMKIconStyle *)style 

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

-addPlacemarksWithPoints:image:style:

- (nonnull NSArray< YMKPlacemarkMapObject * > *)addPlacemarksWithPoints:(nonnull NSArray< YMKPoint * > *)points
                                                                  image:(nonnull UIImage *)image
                                                                  style:(nonnull YMKIconStyle *)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.

-addPolygonWithPolygon:

- (nonnull YMKPolygonMapObject *)addPolygonWithPolygon:(nonnull YMKPolygon *)polygon 

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

-addPolylineWithPolyline:

- (nonnull YMKPolylineMapObject *)addPolylineWithPolyline:(nonnull YMKPolyline *)polyline 

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

-clear

- (void)clear

Removes all map objects from the collection.

-placemarksStyler

- (nonnull YMKPlacemarksStyler *)placemarksStyler

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

-removeWithMapObject:

- (void)removeWithMapObject:(nonnull YMKMapObject *)mapObject 

Removes the given map object from the collection.

-traverseWithMapObjectVisitor:

- (void)traverseWithMapObjectVisitor:(nonnull id< YMKMapObjectVisitor >)mapObjectVisitor 

Traverses through the collection with a visitor object.

Used for iteration over map objects in the collection.