IPrxMap.SpecificXML

Syntax

SpecificXML: String;

Description

The SpecificXML property determines the displayed topobase fragment in the XML format.

Comments

The displayed topobase fragment must be part of the original topobase. To get the original topobase, use the IPrxMap.OriginalTopobase property.

To reset the displayed topobase, set the SpecificXML property to empty value.

Example

Executing the example requires that the repository contains a regular report with the PRX_MAP identifier. This report must contain a map on the active sheet.

Add links to the Metabase, Report, Tab, Topobase system assemblies in the unit.

Sub UserProc;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    Report: IPrxReport;
    Tab: ITabSheet;
    Map: IPrxMap;
    Topo, SpecTopo: ITopobase;
    Tree: String;
Begin
    // Get the current repository
    MB := MetabaseClass.Active;
    // Get report
    MObj := MB.ItemById("PRX_MAP").Edit;
    // Get map
    Report := MObj As IPrxReport;
    Tab := (Report.ActiveSheet As IPrxTable).TabSheet;
    Map := Tab.Objects.Item(0).Extension As IPrxMap;
    // Get topobase
    Topo := Map.OriginalTopobase As ITopobase;
    // Get topobase tree-structure
    Tree := Topo.Tree;
    // Display it to the console window
    Debug.WriteLine(Tree);
    // Set new tree-structure for topobase
    Tree := "<Topobase><Layer Name=" + """" + "RootLayer" + """" + " Id=" + """" + "1" + """" +
        "><Layer Name=" + """" + "Regions" + """" + " Id=" + """" + "2" + """" +
        "><Shape Name=" + """" + "Adygeya Republic" + """" + " Id=" + """" + "135" + """" + "/></Layer></Layer></Topobase>";
    // Display new structure on map
    Map.SpecificXML := Tree;
    // Automatically zoom map
    Map.AutoScaled := True;
    // Save changes
    MObj.Save;
End Sub UserProc;

After executing the example the zoomed fragment of the original map is displayed in the report.

See also:

IPrxMap