Interface Renderer

  • All Implemented Interfaces:

    
    public interface Renderer
    
                        

    Interface for a renderer that can draw Layers onto a map.

    Implementations of this interface handle the specifics of how to render the abstract com.google.maps.android.renderer.model.MapObjects contained in a layer to a specific map target (e.g., GoogleMap, GoogleMap Compose, etc.).

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract Unit addLayer(Layer layer) Adds a layer to the renderer.
      abstract Boolean removeLayer(Layer layer) Removes a layer from the renderer.
      abstract Collection<Layer> getLayers() Gets all layers currently managed by the renderer.
      abstract Unit clear() Clears all layers from the renderer and removes their contents from the map.
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • addLayer

         abstract Unit addLayer(Layer layer)

        Adds a layer to the renderer. The layer's contents should be drawn on the map.

        Parameters:
        layer - The layer to add.
      • removeLayer

         abstract Boolean removeLayer(Layer layer)

        Removes a layer from the renderer. The layer's contents should be removed from the map.

        Parameters:
        layer - The layer to remove.
        Returns:

        True if the layer was removed, false otherwise.

      • getLayers

         abstract Collection<Layer> getLayers()

        Gets all layers currently managed by the renderer.

        Returns:

        A collection of layers.

      • clear

         abstract Unit clear()

        Clears all layers from the renderer and removes their contents from the map.