MapMouseEventArgs
Namespace: Wisej.Web.Ext.GoogleMaps
Assembly: Wisej.Web.Ext.GoogleMaps (4.1.0.0)
Provides data for the MapClick and the MapDoubleClick event.
- C#
- VB.NET
public class MapMouseEventArgs : EventArgs
Public Class MapMouseEventArgs
Inherits EventArgs
Constructors
MapMouseEventArgs(e)
Initializes an instance of the MapMouseEventArgs class.
| Name | Type | Description |
|---|---|---|
| e | WidgetEventArgs | The event data from the client. |
Throws:
- ArgumentNullException e is null.
Properties
Button
MouseButtons: Returns which mouse button was pressed.
Value: One of the MouseButtons values.
Right for right clicks, Left in all other cases.
Location
LatLng: Returns the coordinates of the click.
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
| Name | Description |
|---|---|
| MapMouseEventHandler | Represents the method that will handle the mouse events of a GoogleMap control. |