Raised when the user clicks on the map surface.
Namespace: MindFusion.Mapping
File: MapView.js
JavaScript Copy Code |
---|
EventDispatcher click |
The event handler method receives the following arguments:
sender
A MapView instance, which is the source of the event. This object will be passed to the handler function as the first argument.
args
A MapEventArgs instance, which contains event data. This object will be passed to the handler function as the second argument.
The following code handles the click event of a MapView and checks if the user has clicked on a Marker. If yes - renders it:
JavaScript Copy Code |
---|
// create a new instance of the mapView var markers = new m.DecorationLayer("Images"); // create some markers with images view.layers.add(markers); view.click.addEventListener(mapViewClickHandler); function mapViewClickHandler( sender, args ) |