com.google.gwt.maps.client
Class CopyrightCollection

java.lang.Object
  extended by com.google.gwt.maps.client.CopyrightCollection

public final class CopyrightCollection
extends java.lang.Object

Manages copyright messages displayed on maps of custom map type. If you don't implement custom map types, then you don't need to use this class. A copyright collection contains information about which copyright to display for which region on the map at which zoom level. This is important for map types that display heterogeneous data such as the satellite map type.

See Also:
TileLayer.TileLayer(CopyrightCollection, int, int)

Constructor Summary
CopyrightCollection()
          Creates an empty copyright collection.
CopyrightCollection(java.lang.String prefix)
          Creates an empty copyright collection with the given prefix.
 
Method Summary
 void addCopyright(Copyright copyright)
          Adds a copyright to this collection.
 void addNewCopyrightHandler(NewCopyrightHandler handler)
          Add a handler for "newcopyright" events.
 java.lang.String getCopyrightNotice(LatLngBounds bounds, int zoomLevel)
          Returns the copyright notice for the given viewport.
 java.lang.String[] getCopyrights(LatLngBounds bounds, int zoomLevel)
          Returns the copyrights that should be displayed for the given viewport.
 void removeNewCopyrightHandler(NewCopyrightHandler handler)
          Removes a single handler of this copyright collection previously added with addNewCopyrightHandler(NewCopyrightHandler).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CopyrightCollection

public CopyrightCollection()
Creates an empty copyright collection.


CopyrightCollection

public CopyrightCollection(java.lang.String prefix)
Creates an empty copyright collection with the given prefix. Each copyright produced from this collection will have the given prefix.

Parameters:
prefix - the prefix for every copyright
Method Detail

addCopyright

public void addCopyright(Copyright copyright)
Adds a copyright to this collection.

Parameters:
copyright - the copyright to be added

addNewCopyrightHandler

public void addNewCopyrightHandler(NewCopyrightHandler handler)
Add a handler for "newcopyright" events. This event is fired when a new copyright was added to this copyright collection.

Parameters:
handler - handler to invoke on mouse click events.

getCopyrightNotice

public java.lang.String getCopyrightNotice(LatLngBounds bounds,
                                           int zoomLevel)
Returns the copyright notice for the given viewport.

Parameters:
bounds - the viewport's geographical bounds
zoomLevel - the viewport's zoom level
Returns:
the copyright notice for the given viewport

getCopyrights

public java.lang.String[] getCopyrights(LatLngBounds bounds,
                                        int zoomLevel)
Returns the copyrights that should be displayed for the given viewport.

Parameters:
bounds - the viewport's geographical bounds
zoomLevel - the viewport's zoom level
Returns:
the copyrights for the given viewport

removeNewCopyrightHandler

public void removeNewCopyrightHandler(NewCopyrightHandler handler)
Removes a single handler of this copyright collection previously added with addNewCopyrightHandler(NewCopyrightHandler).

Parameters:
handler - the handler to remove