Home > @magiclane/maps-sdk > MarkerCollection
MarkerCollection class
Marker collection class
Holds markers of a single visual style and geometry class for a map view.
Common tasks are creating a collection for a specific marker kind and adding or removing markers, looking up markers by position or identifier, iterating or counting entries, querying the collection's geographic extent for layout or hit‑testing, grouping and retrieving related components.
Can be presented on a map via the MapViewMarkerCollections object associated with a GemMapController.
Also see MarkerSketches for a specialized marker collection with per-marker render settings.
Signature:
export declare class MarkerCollection Constructors
|
Constructor |
Modifiers |
Description |
|---|---|---|
|
Constructs a new instance of the |
Properties
|
Property |
Modifiers |
Type |
Description |
|---|---|---|---|
|
|
Get whole collection enclosing area. | ||
|
|
number |
Get collection id. | |
|
|
number | ||
|
string |
Get collection name. | ||
|
|
number | bigint | ||
|
|
number |
Get marker count. | |
|
|
Get collection type. |
Methods
|
Method |
Modifiers |
Description |
|---|---|---|
|
Add a new marker to collection. | ||
|
Get marker at a specific index (alias for getMarkerAt). | ||
|
Delete all markers. | ||
|
|
Create a new marker collection. | |
|
Delete a marker by index. | ||
|
|
Create MarkerCollection from JSON data. | |
|
Get the marker at the given index. Return null if index is not valid. | ||
|
Get the marker with the given id. | ||
|
Gets the points group components. This requires the collection to be added to a map view collection with MarkerCollectionRenderSettings.buildPointsGroupConfig set to true If points group head info is not available the function will return a default list and will set the API error accordingly | ||
|
Gets the points group head for the given marker id. This requires the collection to be added to a map view collection with MarkerCollectionRenderSettings.buildPointsGroupConfig set to true If points group head info is not available the function will return null and will set the API error accordingly If markerId is already a points group head the function will return a reference to the queried marker and will set the API error accordingly | ||
|
Hit test in collection markers. | ||
|
Get the index of the given marker. | ||
|
| ||
|
|
Deserialize from buffer. | |
|
Serialize to buffer. | ||
|
Serialize collection to JSON format. |