GLMapMarkerLayer
@interface GLMapMarkerLayer : GLMapDrawObject
GLMapMarkerLayer displays big number of markers with given style. It supports marker clustering.
-
Unavailable
Please use inits with data.
Plain -init is disabled
Declaration
Objective-C
- (instancetype _Nonnull)init; -
Initializes
GLMapMarkerLayerwith given markers andstyleDeclaration
Objective-C
- (nonnull instancetype) initWithMarkers:(nonnull NSArray<id> *)markers andStyles:(nonnull GLMapMarkerStyleCollection *)styleCollection clusteringRadius:(double)clusteringRadius drawOrder:(int)drawOrder;Parameters
markersArray of marker objects. Usually you set objects with data, that you need to display on map.
styleCollectionA style collection object used to display markers.
clusteringRadiusRadius of clustering in points (0 will disable clustering)
drawOrderdraw order of layer
Return Value
A new marker layer
-
Initializes
GLMapMarkerLayerwith given array of vector objects andstyle. When using this constructor location of markers is filled from vector object. It can be modified in style together with style and text.Declaration
Objective-C
- (nonnull instancetype) initWithVectorObjects:(nonnull GLMapVectorObjectArray *)vectorObjects andStyles:(nonnull GLMapMarkerStyleCollection *)styleCollection clusteringRadius:(double)clusteringRadius drawOrder:(int)drawOrder;Parameters
vectorObjectsArray of vector objects.
styleCollectionA style collection object used to display markers.
clusteringRadiusRadius of clustering in points (0 will disable clustering)
drawOrderdraw order of layer
Return Value
A new marker layer
-
Initializes
GLMapMarkerLayerwith given markers andstyleDeclaration
Objective-C
- (nonnull instancetype) initWithVectorObjects:(nonnull GLMapVectorObjectArray *)objects cascadeStyle:(nonnull GLMapVectorCascadeStyle *)cascadeStyle styleCollection:(nonnull GLMapMarkerStyleCollection *)styleCollection clusteringRadius:(double)clusteringRadius drawOrder:(int)drawOrder;Parameters
objectsArray of vector objects.
cascadeStyleA cascade style used to select image for marker.
styleCollectionA style collection object used to display markers.
clusteringRadiusRadius of clustering in points (0 will disable clustering)
drawOrderdraw order of layer
Return Value
A new marker layer
-
Copies markers from other layer
Declaration
Objective-C
- (void)copyMarkersFromLayer:(nonnull GLMapMarkerLayer *)layer;Parameters
layerother layer with markers to copy
-
Adds or removes markers on layer
Declaration
Objective-C
- (void)add:(NSArray<id> *_Nullable)markersToAdd remove:(NSArray<id> *_Nullable)markersToRemove reload:(NSArray<id> *_Nullable)markersToReload animated:(BOOL)animated completion:(dispatch_block_t _Nullable)completion;Parameters
markersToAddmarkers that should be added
markersToRemovemarkers that should be removed (compared by pointer)
markersToReloadmarkers that should be reloaded
animatedif
YESmodification will be animatedcompletionblock that will be called when modification is finished
-
Changes style of marker layer
Declaration
Objective-C
- (void)changeStyle:(nonnull GLMapMarkerStyleCollection *)style completion:(dispatch_block_t _Nullable)completion;Parameters
styleNew style
completionblock that will be called when modification is finished
-
Searchs nearest object or cluster of objects at given mapView
Declaration
Objective-C
- (NSArray<id> *_Nullable)objectsAtMapView:(nonnull GLMapView *)mapView nearPoint:(GLMapPoint)point distance:(double)distanceInPoints;Parameters
mapViewmap view where layer is displayed
pointpoint where object(s) will be searched
distanceInPointsmaximum hit distance in points
Return Value
An array of objects that meets search criteria
-
Animation duraration
Declaration
Objective-C
@property (atomic, assign, unsafe_unretained, readwrite) double animationDuration;
Install in Dash
GLMapMarkerLayer Class Reference