Map: IMap;
The Map property determines a map that is needed to get an access to.
Executing the example requires a form with the following components: the Button component named Button1 and the UiMap component named UiMap1.
The example is a handler of the OnClick event for the Button1 component.
Add links to the ExtCtrls, Forms, Map, and Metabase system assemblies.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
MB: IMetabase;
MBObj: IMetabaseObjectDescriptor;
Topobase: IMapTopobase;
Begin
MB := MetabaseClass.Active;
MBObj := MB.ItemById("KARTA_RF");
Topobase := MBObj.Bind As IMapTopobase;
UiMap1.Map.Topobase := Topobase;
End Sub Button1OnClick;
After executing the example on clicking the button the map, which topobase is stored in the repository object with the KARTA_RF identifier, is connected to the UiMap1 component.
See also: