Creates a new MarkerCollection without specifying the data yet. This could be useful since fetching the data typically happens at a different time Providing data when creating the marker-collection is optional.
Creates a new MarkerCollection with existing data.
Optional
keyThe key function used to create string ids for the records in the collection. Specifying this function is highly recommended when the data needs to be updated.
Returns the Google Map instance this collection was added to.
Adds this collection to the specified map instance. This will add all markers to the map.
Protected
createCreates a new Marker with the specified options and data.
Protected
generateGenerates a key for the passed user-data record. This implementation calls the key-function if specified or generates a random key and stores it.
Sets the attributes for all markers.
Sets or updates the data for this collection. When updating data, the implementation will use the key-function provided with the Options to detrmine which records were added, removed or changed and update the underlying marker instances accordingly.
An extended MarkerCollection that can directly be used with results from the PlacesService.
Example