English | Site Directory

Android - An Open Handset Alliance Project

com.google.android.maps.OverlayController

java.lang.Object
com.google.android.maps.OverlayController

This class manages a bundle of Overlays, and supervises their interaction with the Maps activity and the MapView.

Summary

Public Methods

        void  activate(Overlay overlay, boolean turnOffOthers)
Activate the given overlay, and optionally deactivate all others.
        void  add(Overlay overlay, boolean activate)
Add the given overlay, and optionally activate it (deactivating all others).
        void  clear()
Remove all non-permanent layers from the bundle.
        void  deactivate(Overlay o)
Deactivates the given overlay.
        boolean  doZoom(boolean zoomIn)
Provides access to the special ZoomOverlay.
        List  getOverlays()
Methods inherited from class java.lang.Object

Details

Public Methods

public void activate(Overlay overlay, boolean turnOffOthers)

Activate the given overlay, and optionally deactivate all others. Assumes the overlay has already been add(Overlay, boolean)ed. If it has not, an IllegalArgumentException is thrown.

public void add(Overlay overlay, boolean activate)

Add the given overlay, and optionally activate it (deactivating all others).

public void clear()

Remove all non-permanent layers from the bundle.

public void deactivate(Overlay o)

Deactivates the given overlay. If it has not beed added to a bundle, this may have no effect.

public boolean doZoom(boolean zoomIn)

Provides access to the special ZoomOverlay.

Parameters

zoomIn if true, zooms in; if false, zooms out.

Returns

  • true if the requested next zoom level is available; false if we hit the max or min (or the ZoomOverlay was missing).

public List getOverlays()

Returns

  • an unmodifiable list containing all overlays that have been added.
Build m5-rc15i - 10 Jun 2008 13:54