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()

    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
      MapObjectManager(GoogleMap mMap)
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract C newCollection()
      C newCollection(String id) Create a new named collection, which can later be looked up by getCollection
      C getCollection(String id) Gets a named collection that was created by newCollection
      Boolean remove(O mapObject) Removes an object from its collection.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MapObjectManager

        MapObjectManager(GoogleMap mMap)
    • Method Detail

      • 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.
      • remove

         Boolean remove(O mapObject)

        Removes an object from its collection.

        Parameters:
        mapObject - the object to remove.
        Returns:

        true if the object was removed.