GLMapMarkerStyleCollection
Objective-C
@interface GLMapMarkerStyleCollection : NSObject
Swift
class GLMapMarkerStyleCollection : NSObject
GLMapMarkerStyleCollection class holds a collection of styles used to draw a marker layer.
-
Declaration
Objective-C
- (instancetype _Nonnull)init;Swift
init()Return Value
Returns a new instance of
GLMapMarkerStyleCollection. -
Adds a block used to fill data for markers.
GLMapMarkerDataFillBlockis called for each marker, it should set marker information intoGLMapMarkerDatavariable usingGLMapMarkerSetStyle,GLMapMarkerSetTextfunctions.Declaration
Objective-C
- (void)setMarkerDataFillBlock:(GLMapMarkerDataFillBlock _Nullable)block;Swift
func setMarkerDataFill(_ block: GLMapMarkerDataFillBlock?)Parameters
blockA marker data fill block.
-
Sets a block used to get the location for markers.
Declaration
Objective-C
- (void)setMarkerLocationBlock:(GLMapMarkerLocationBlock _Nullable)block;Swift
func setMarkerLocationBlock(_ block: GLMapMarkerLocationBlock?)Parameters
blockA marker location block.
-
GLMapMarkerUnionBlockis called when the marker layer needs a style for a union ofcountmarkers. It should return a number.Declaration
Objective-C
- (void)setMarkerUnionFillBlock:(GLMapMarkerUnionFillBlock _Nullable)block;Swift
func setMarkerUnionFill(_ block: GLMapMarkerUnionFillBlock?)Parameters
blockA cluster data fill block.
-
Adds a new style to the collection that has only one image.
Declaration
Objective-C
- (uint32_t)addStyleWithImage:(PlatformImage *_Nonnull)image;Swift
func addStyle(with image: NSImage) -> UInt32Parameters
imageThe image that will have the default offset (center of the image).
Return Value
The index in the collection for this style.
-
Adds a new style to the collection that has several images.
Declaration
Objective-C
- (uint32_t)addStyleWithImages:(NSArray<PlatformImage *> *_Nonnull)images;Swift
func addStyle(with images: [NSImage]) -> UInt32Parameters
imagesAn array of images that will have the default offset (center of the image).
Return Value
The index in the collection for this style.
-
Adds a new style to the collection that has 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]?) -> UInt32Parameters
imagesAn array of images.
offsetsOffsets of the images.
Return Value
The index in the collection for this style.
-
Sets a name for the 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
styleIndexThe index of the style.
nameThe name to set.
Install in Dash
GLMapMarkerStyleCollection Class Reference