Selected: Boolean;
The Selected property determines whether map area is selected.
Available values:
True. Map area is selected.
False. Default value. Map area is not selected.
Executing the example requires that the repository contains an express report with the EXPRESS identifier. The express report must contain a map with the Regions layer.
Add links to the Drawing, Express, Metabase, Visualizators system assemblies.
Sub UserProc;
Var
Metabase: IMetabase;
EaxAnalyzer: IEaxAnalyzer;
EMap: IVZMapChart;
MapShape: IVZMapChartShape;
Layer: IVZMapChartLayer;
ShapeId: String;
Color: IGxColor;
Begin
// Get the current repository
Metabase := MetabaseClass.Active;
// Get express report
EaxAnalyzer := Metabase.ItemById("EXPRESS").Edit As IEaxAnalyzer;
// Get express report map as a visualizer
EMap := EaxAnalyzer.MapChart.MapChart;
// Get map layer
Layer := EMap.RootLayer.LayerById("Regions");
// Select area
ShapeId := Layer.Shapes.Item(20).ShapeId;
MapShape := Layer.ShapeById(ShapeId);
// Select area on map
MapShape.Selected := True;
// |Select area on map by changing border color
Color := New GxColor.CreateRGB(85, 157, 170);
MapShape.Border := New GxPen.CreateSolid(Color, 4);
// Set background of map layer area without fill
MapShape.IsStrokedShape := True;
// Get express report
(EaxAnalyzer As IMetabaseObject).Save;
End Sub UserProc;
After executing the example, an area with specified identifier is marked on the map, area border color is changed, map layer area background is displayed without fill.
See also: