The mapping functionality offers some unique features to enable interactivity.
Shapes have a Hotspot property which allows mouseover tooltips and other interactive functionality. For more information see hotspots tutorial.
The most useful application of this is to set DefaultShape's hotspot properties as shown in this sample.
Click to GPS (Lat/Long) coordinates
This feature allows a pixel coordinate on the map to be translated into GPS coordinates of the point based on the map. By capturing a user's click coordinate this information can be translated into GPS coordinates to provide zooming on the map or using the GPS position to query information from other services.
PointF gpsPoint = Chart.Mapping.GetLatLongCoordinates("50,100");
Dim gpsPoint AS Chart.Mapping.GetLatLongCoordinates("50,100")
This feature also works with projections applied to the map.
Click to Shapes array
From the click pixel position an array of Shape objects that land under the coordinate can be acquired. This can be used to select specific shapes and display its details or modify any of its properties.
ArrayList shapes = Chart.Mapping.GetShapesAtPoint("50,100);
[Visual Basic] Chart.FileManager.SaveImage()
Dim shapes AS Chart.Mapping.GetShapesAtPoint("50,100)
|Note: The reason the SaveImage method is called is because the chart must be generated to have the information necessary to process these requests.|
The ajax zoomer feature also supports mapping. This will allow the user to interactively zoom and scroll maps on demand.