Class MapObjectManager
-
- All Implemented Interfaces:
public abstract class MapObjectManager<O extends Object, C extends MapObjectManager.Collection<O, C>>Abstract base implementation for map object collection manager classes.
Keeps track of collections of objects on the map. Delegates all object-related events to each collection's individually managed listeners.
All object operations (adds and removes) should occur via its collection class. That is, don't add an object via a collection, then remove it via Object.remove()
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classMapObjectManager.Collection
-
Constructor Summary
Constructors Constructor Description MapObjectManager(GoogleMap mMap)
-
Method Summary
Modifier and Type Method Description abstract CnewCollection()CnewCollection(String id)Create a new named collection, which can later be looked up by getCollection CgetCollection(String id)Gets a named collection that was created by newCollection Booleanremove(O mapObject)Removes an object from its collection. -
-
Method Detail
-
newCollection
abstract C newCollection()
-
newCollection
C newCollection(String id)
Create a new named collection, which can later be looked up by getCollection
- Parameters:
id- a unique id for this collection.
-
getCollection
C getCollection(String id)
Gets a named collection that was created by newCollection
- Parameters:
id- the unique id for this collection.
-
-
-
-