Markers: IVZMapChartMarkers;
The Markers property determines collection of map geolocation markers.
Geolocation marker is a point bound to territory. Markers enable the user to display items on the map that are required for a user, for example: shops or metro stations.
Executing the example requires a form contains the components:
EaxDocumentViewerBox named EaxDocumentViewerBox1.
UiErAnalyzer named UiErAnalyzer1 that is a data source for EaxDocumentViewerBox1.
Specify an express report with map as a data source for the UiErAnalyzer1 component. The report contains one dimension of geolocation objects and several geolocation markers.
Add links to the Drawing, Visualizators system assemblies.
Sub UserProc;
Var
Express: IEaxAnalyzer;
MapChart: IEaxMapChart;
VisMapChart: IVZMapChart;
Markers: IVZMapChartMarkers;
Marker, MarkerAdd: IVZMapChartMarker;
Color: IGxColor;
ToolTipStyle: IVZToolTipStyle;
Topo: IVZMapChartTopobase;
MetaInfo: IVZMapChartTopobaseMetaInfo;
LeftGeoItem, RightGeoItem: IVZMapChartTopobaseGeoItem;
Begin
// Get express report
Express := UiErAnalyzer1.ErAnalyzer;
// Get map as a visualizer
MapChart := Express.MapChart;
VisMapChart := MapChart.MapChart;
// Get collection of geolocation markers
Markers := VisMapChart.Markers;
// Get geolocation marker
Marker := Markers.Item(0);
// Create a new geolocation marker
MarkerAdd := New VZMapChartMarker.Create;
// Add created marker to collection
Markers.Add(MarkerAdd);
// Insert specified marker into the second position in the collection
Markers.InsertAt(2, MarkerAdd);
// Change marker identifier
Marker.MarkerId := "GeoMarker";
// Create a new tooltip style
ToolTipStyle := New VZToolTipStyle.Create;
// Change tooltip font color
Color := New GxColor.CreateRGB(120, 0, 120);
ToolTipStyle.FontColor := Color;
// Apply style to tooltips of geolocation marker
Marker.ToolTipStyle := ToolTipStyle;
// Get map toppobase
Topo := VisMapChart.Topobase;
// Get topobase metadata
MetaInfo := Topo.Meta;
// Create new marker coordinates and apply them
LeftGeoItem := New VZMapChartTopobaseGeoItem.Create;
LeftGeoItem.Longitude := 50;
MetaInfo.GeoLeftBottom := LeftGeoItem;
RightGeoItem := New VZMapChartTopobaseGeoItem.Create;
RightGeoItem.Longitude := -50;
MetaInfo.GeoRightTop := RightGeoItem;
// Refresh map
MapChart.Refresh;
End Sub UserProc;
After executing the example:
A new geolocation marker is added to certain collection position.
Identifier of the obtained geolocation marker is changed.
Font color of geolocation marker tooltip is changed.
A binding area is created with new coordinates, geolocation marker is shifted according to the area size.
See also: