GLMapMarkerStyleCollection


@interface GLMapMarkerStyleCollection : NSObject

GLMapMarkerStyleCollection class holds collection of styles, used to draw marker layer.

  • Declaration

    Objective-C

    - (instancetype _Nonnull)init;

    Return Value

    Returns new instance of GLMapMarkerStyleCollection

  • Adds block used to fill data for markers. GLMapMarkerDataFillBlock is called for each marker, is should set marker information into GLMapMarkerData variable using GLMapMarkerSetStyle, GLMapMarkerSetText functions.

    Declaration

    Objective-C

    - (void)setMarkerDataFillBlock:(GLMapMarkerDataFillBlock _Nullable)block;

    Parameters

    block

    A marker data fill block

  • Sets block used to get location for markers.

    Declaration

    Objective-C

    - (void)setMarkerLocationBlock:(GLMapMarkerLocationBlock _Nullable)block;

    Parameters

    block

    A marker location block

  • GLMapMarkerUnionBlock called when marker layer needs style for union of count markers. It should return number

    Declaration

    Objective-C

    - (void)setMarkerUnionFillBlock:(GLMapMarkerUnionFillBlock _Nullable)block;

    Parameters

    block

    A cluster data fill block

  • Adds new style to collection that have only one image

    Declaration

    Objective-C

    - (uint32_t)addStyleWithImage:(PlatformImage *_Nonnull)image;

    Parameters

    image

    Image that will have default offset (center of image) @retun index in collection for this style

  • Adds new style to collection that have several images

    Declaration

    Objective-C

    - (uint32_t)addStyleWithImages:(NSArray<PlatformImage *> *_Nonnull)images;

    Parameters

    images

    array of images that will have default offset (center of image) @retun index in collection for this style

  • Adds new style to collection that have images with offsets

    Declaration

    Objective-C

    - (uint32_t)addStyleWithImages:(NSArray<PlatformImage *> *_Nonnull)images
                        andOffsets:(NSArray<NSValue *> *_Nullable)offsets;

    Parameters

    images

    array of images

    offsets

    offsets of images @retun index in collection for this style

  • Set name for style that can be used from mapcss

    Declaration

    Objective-C

    - (void)setStyleName:(NSString *_Nonnull)name
           forStyleIndex:(uint32_t)styleIndex;

    Parameters

    styleIndex

    index of style

    name

    name to set