LoadFromFile(FileName: String);
FileName - name of the file, from which a topobase should be loaded.
The LoadFromFile method loads a topobase from a file.
Executing the example requires a form with a button named Button1, the UiMap component named UiMap1 and the MapBox component. UiMap is a data source for MapBox.The file system should include the C:\MAP_RF.tbs file containing a topobase.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
TopoBase: IMapTopobase;
Map: IMap;
Begin
TopoBase := New DxMapTopobase.Create As IMapTopobase;
TopoBase.LoadFromFile("C:\MAP_RF.tbs");
Map := UiMap1.Map;
Map.Topobase := TopoBase;
End Sub Button1OnClick;
After executing the example the topobase from the C:\MAP_RF.tbs file is loaded to the MapBox component.
See also: