Methods
addMarkers
- addMarkers(markers: IMarker[]): void
removeById
- removeById(id: string): void
updateById
- updateById(id: string, options: object): void
-
Parameters
-
id: string
-
options: object
-
Optional icon?: Icon
-
Optional lat?: number
-
Optional lng?: number
Returns void
MarkerCollection helps keeping track of many IMarkers. The methods provided add or remove IMarker's from the collection.
// Marker to be used for testing. const marker: IMarker = { id: "87998" icon: Icon.DEFAULT_RED, lat: 20.6492650861356 lng: -103.43710715239851 } // Create marker collection. const markerCollection = new MarkerCollection(); // Add marker. markerCollection.addMarker(marker); // Removes marker. markerCollection.removeById("87998");