RegionClick: function (sender, args);
sender. Event source.
args. Event information. Available: ShapeName - name of a shape in the map, ShapeId - shape identifier, Position - shape position defined via coordinate properties X and Y, IsDHTML - indicates if a DHTML map is used.
The RegionClick event occurs after selecting a region in the express report map.
Executing the example requires that the HTML page contains the ExpressBox component named expressBox (see the Example of Creating the ExpressBox Component page) and have a loaded map in the working area. Get information on a region selected in the express report map:
// Get express report map view var mapView = expressBox.getDataView().getMapView(); // Handle the RegionClick event mapView.RegionClick.add(function (sender, args) { console.log("Shape name: " + args.ShapeName); console.log("Shape identifier: " + args.ShapeId); console.log("Shape position: (" + args.Position.X + ", " + args.Position.Y + ")"); });
After executing the example the browser console displays name, identifier and position of the shape that corresponds to the selected region:
Shape name: Krasnoyarsk krai
Shape identifier: RU-KYA
Shape position: (791, 410)
See also: