Skip to main content

MapMouseEventArgs

Namespace: Wisej.Web.Ext.GoogleMaps

Assembly: Wisej.Web.Ext.GoogleMaps (4.1.0.0)

Provides data for the MapClick and the MapDoubleClick event.

public class MapMouseEventArgs : EventArgs

Constructors​

Instance member MapMouseEventArgs(e)​

Initializes an instance of the MapMouseEventArgs class.

NameTypeDescription
eWidgetEventArgsThe event data from the client.

Throws:

Properties​

Instance member Button​

MouseButtons: Returns which mouse button was pressed.

Value: One of the MouseButtons values.

Right for right clicks, Left in all other cases.

Instance member Location​

LatLng: Returns the coordinates of the click.

Instance member Marker​

String: Returns the ID of the clicked marker. Null if the click landed on the map outside of a marker.

Example:

Distinguishing clicks on markers from clicks on the map:

private void googleMap1_MapClick(object sender, MapMouseEventArgs e)
{
if (e.Marker != null)
this.googleMap1.ShowInfoWindow(e.Marker, "Marker " + e.Marker);
else
this.googleMap1.CenterMap(e.Location);
}

Used By​

NameDescription
MapMouseEventHandlerRepresents the method that will handle the mouse events of a GoogleMap control.