com.google.gwt.maps.client.event
Class MapClickHandler.MapClickEvent

java.lang.Object
  extended by java.util.EventObject
      extended by com.google.gwt.maps.client.event.MapClickHandler.MapClickEvent
All Implemented Interfaces:
java.io.Serializable
Enclosing interface:
MapClickHandler

public static class MapClickHandler.MapClickEvent
extends java.util.EventObject

Encapsulates the arguments for the "click" event on a MapWidget.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
MapClickHandler.MapClickEvent(MapWidget source, Overlay overlay, LatLng latlng, LatLng overlaylatlng)
           
 
Method Summary
 LatLng getLatLng()
          If the click is not on a marker, the geographical coordinates of the point that was clicked are passed in the point argument.
 Overlay getOverlay()
          If the click was on a marker, then the marker is passed to the event handler in the overlay argument, and a click event is also fired on the marker.
 LatLng getOverlayLatLng()
          If the user clicks on an overlay that is clickable, returns the coordinates of the clicked overlay.
 MapWidget getSender()
          Returns the instance of the map that generated this event.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MapClickHandler.MapClickEvent

public MapClickHandler.MapClickEvent(MapWidget source,
                                     Overlay overlay,
                                     LatLng latlng,
                                     LatLng overlaylatlng)
Method Detail

getLatLng

public LatLng getLatLng()
If the click is not on a marker, the geographical coordinates of the point that was clicked are passed in the point argument.

Returns:
a point coordinate if the click was not over a marker, otherwise null.

getOverlay

public Overlay getOverlay()
If the click was on a marker, then the marker is passed to the event handler in the overlay argument, and a click event is also fired on the marker.

Returns:
an overlay instance if the click is on a marker, otherwise null.

getOverlayLatLng

public LatLng getOverlayLatLng()
If the user clicks on an overlay that is clickable, returns the coordinates of the clicked overlay.

Returns:
the coordinates of the clicked overlay if the click was over an overlay, otherwise null.

getSender

public MapWidget getSender()
Returns the instance of the map that generated this event.

Returns:
the instance of the map that generated this event.