GLMapMarkerStyleCollection
Objective-C
@interface GLMapMarkerStyleCollection : NSObject
Swift
class GLMapMarkerStyleCollection : NSObject
GLMapMarkerStyleCollection
class holds collection of styles, used to draw marker layer.
-
Declaration
Objective-C
- (instancetype _Nonnull)init;
Swift
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 intoGLMapMarkerData
variable usingGLMapMarkerSetStyle
,GLMapMarkerSetText
functions.Declaration
Objective-C
- (void)setMarkerDataFillBlock:(GLMapMarkerDataFillBlock _Nullable)block;
Swift
func setMarkerDataFill(_ block: GLMapMarkerDataFillBlock?)
Parameters
block
A marker data fill block
-
Sets block used to get location for markers.
Declaration
Objective-C
- (void)setMarkerLocationBlock:(GLMapMarkerLocationBlock _Nullable)block;
Swift
func setMarkerLocationBlock(_ block: GLMapMarkerLocationBlock?)
Parameters
block
A marker location block
-
GLMapMarkerUnionBlock
called when marker layer needs style for union ofcount
markers. It should return numberDeclaration
Objective-C
- (void)setMarkerUnionFillBlock:(GLMapMarkerUnionFillBlock _Nullable)block;
Swift
func setMarkerUnionFill(_ block: GLMapMarkerUnionFillBlock?)
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;
Swift
func addStyle(with image: NSImage) -> UInt32
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;
Swift
func addStyle(with images: [NSImage]) -> UInt32
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;
Swift
func addStyle(with images: [NSImage], andOffsets offsets: [NSValue]?) -> UInt32
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;
Swift
func setStyleName(_ name: String, forStyleIndex styleIndex: UInt32)
Parameters
styleIndex
index of style
name
name to set