Legend: IMapLegend;
The Legend property determines a map legend.
Executing the example requires a form with the Button1 button, the MapBox component and the UiMap component that is a data source for MapBox.
The example is executed on clicking the button.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Legend: IMapLegend;
MapView: IMapView;
Begin
Legend := New DxMapLegend.Create;
MapView := UiMap1.Map.View;
MapView.Legend := Legend;
End Sub Button1OnClick;
After executing the example a map legend is created.
See also: