Triggered when the user clicks on a Marker.

Namespace: Reimers.Google.Map
Assembly: Reimers.Google.Map (in Reimers.Google.Map.dll) Version: 5.3.95.699 (5.3.95.699)

Syntax

C#
public event EventHandler<OverlayEventArgs> OverlayClick

Remarks

The event is triggered as a result of a asynchronous callback to the server. While this allows for event handling using serverside code, all changes to the page (either the map or other controls on the page) must be done using JavaScript commands passed to the MapCommand of the event arguments parameter.

Examples

The following code shows how to check the type of the overlay clicked and cast the overlay to the specific type and perform an action specific to that overlay.

CopyC#
private void Map_OverlayClick(object sender, OverlayEventArgs e)
{
    if (e.Overlay is Marker)
    {
        e.MapCommand = ((Marker)e.Overlay).OpenInfoWindowHTML(e.Map, "You clicked me");
    }
}

See Also