org.zkoss.gmaps.event
Class MapClickEvent

java.lang.Object
  extended by org.zkoss.zk.ui.event.Event
      extended by org.zkoss.zk.ui.event.MouseEvent
          extended by org.zkoss.gmaps.event.MapClickEvent
Direct Known Subclasses:
MapMouseEvent

public class MapClickEvent
extends org.zkoss.zk.ui.event.MouseEvent

Represents a Google Maps Gmaps related event which is triggered whenever the map is clicked on.

Author:
henrichen

Field Summary
 
Fields inherited from class org.zkoss.zk.ui.event.MouseEvent
ALT_KEY, CTRL_KEY, SHIFT_KEY
 
Constructor Summary
MapClickEvent(java.lang.String name, org.zkoss.zk.ui.Component target, org.zkoss.zk.ui.Component ref, double lat, double lng, int x, int y, int clientX, int clientY, int keys)
          Constructs a Google Maps click event.
MapClickEvent(java.lang.String name, org.zkoss.zk.ui.Component target, Gmarker gmarker, double lat, double lng)
          Deprecated.  
 
Method Summary
 java.lang.String getArea()
          Not appliable to this event; it always returns null.
 int getClientX()
          Get the x in pixels related to the browser client
 int getClientY()
          Get the y in pixels related to the browser client
 Gmarker getGmarker()
          Returns the clicked Gmarker or null if not click on a Gmarker.
 double getLat()
          Returns the latitude of the clicked position.
 double getLng()
          Returns the longitude of the clicked position.
 org.zkoss.zk.ui.Component getReference()
          Returns the clicked Component (Gmarker, Gpolyline, Gpolygon) or null if not click on a Component.
 
Methods inherited from class org.zkoss.zk.ui.event.MouseEvent
getKeys, getX, getY
 
Methods inherited from class org.zkoss.zk.ui.event.Event
getData, getName, getPage, getTarget, isPropagatable, stopPropagation, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MapClickEvent

public MapClickEvent(java.lang.String name,
                     org.zkoss.zk.ui.Component target,
                     org.zkoss.zk.ui.Component ref,
                     double lat,
                     double lng,
                     int x,
                     int y,
                     int clientX,
                     int clientY,
                     int keys)
Constructs a Google Maps click event.

Parameters:
name - the event name.
target - the event target (should be a Maps component such as Gmaps.
x - x coordinate related to target component.
y - y coordinate related to target component.
keys - a combination of MouseEvent.CTRL_KEY, MouseEvent.SHIFT_KEY and MouseEvent.ALT_KEY.
ref - the reference component that triggers this event.
lat - the latitude clicked on
lng - the longitude clicked on

MapClickEvent

public MapClickEvent(java.lang.String name,
                     org.zkoss.zk.ui.Component target,
                     Gmarker gmarker,
                     double lat,
                     double lng)
Deprecated. 

Constructs a Google Maps click event.

Parameters:
name - the event name
target - the event target (should be a Maps component such as Gmaps.
gmarker - the reference Gmarker that triggers this event.
lat - the latitude clicked on
lng - the longitude clicked on
Method Detail

getGmarker

public Gmarker getGmarker()
Returns the clicked Gmarker or null if not click on a Gmarker.

See Also:
getReference()

getReference

public org.zkoss.zk.ui.Component getReference()
Returns the clicked Component (Gmarker, Gpolyline, Gpolygon) or null if not click on a Component.

Returns:
the clicked Component (Gmarker, Gpolyline, Gpolygon)
Since:
2.0_9

getArea

public java.lang.String getArea()
Not appliable to this event; it always returns null.

Overrides:
getArea in class org.zkoss.zk.ui.event.MouseEvent
Since:
2.0_9

getLat

public double getLat()
Returns the latitude of the clicked position.


getLng

public double getLng()
Returns the longitude of the clicked position.


getClientX

public final int getClientX()
Get the x in pixels related to the browser client

Since:
2.0_9

getClientY

public final int getClientY()
Get the y in pixels related to the browser client

Since:
2.0_9


Copyright © 2005-2007 Potix Corporation. All Rights Reserved.