GetMapResult GetMap(MapId tMap, GetMapArg tArg)
tMap. Map moniker.
tArg. Parameters of metadata extraction.
The GetMap operation gets map metadata.
To execute the operation, specify map moniker in the tMap parameter, and metadata extraction parameters in the tArg parameter. The moniker can be based on moniker of opened instance of the object, which map is used to work with, following these rules:
"Express report instance moniker"!Map. Express report map (if the express report consists of a single sheet).
"Express report instance moniker"!Sheets!"Sheet key"!Map. Map of the selected express report sheet (if the express report consists of several sheets).
"Workbook instance moniker"!Map. Workbook map (if the workbook consists of a single sheet).
"Workbook instance moniker"!Sheets!"Sheet key"!Map. Map of the selected workbook sheet (if the workbook consists of several sheets).
"Regular report instance moniker"!"Sheet key"!Objects!"Map identifier". Map located on a regular report sheet.
In the tArg.pattern field specify the pattern to be used to extract metadata. The result of the operation is the requested information.
Below is the example of using the GetMap operation to get visual settings of express report map. The request contains map moniker and the pattern for settings extraction. The response contains requested data.
{ "GetMap" : { "tMap" : { "id" : "S1!M!S!E2!Map" },
"tArg" : { "pattern" : { "All" : "false", "DataSource" : "false", "Visual" : "true" } } } }
{ "GetMapResult" : { "id" : { "id" : "S1!M!S!E2!Map" }, "meta" : { "md" : { "MapChart" :
{ "@Background" : "#FFFFFFFF", "@Type" : "SVG", "@Mode" : "Drawing2D", "@Topobase" : "{Topobase}", "ItemsDictionary" : { "Font" : [ {
"@IsItalic" : "False", "@FontFamily" : "Arial", "@Size" : "11", "@Id" : "LegendFontHeader", "@IsBold" : "False", "@Color" : "#FF000000" }, { "@IsItalic" : "False", "@FontFamily" : "Tahoma",
"@Size" : "7", "@Id" : "MapFont", "@IsBold" : "False", "@Color" : "#FF010000" }, { "@IsItalic" : "False", "@FontFamily" : "Arial", "@Size" : "9", "@Id" : "MapTerritoryTranscriptFont",
"@IsBold" : "False", "@Color" : "#FF010000" }, { "@IsItalic" : "False", "@FontFamily" : "Arial", "@Size" : "21", "@Id" : "LegendFont", "@IsBold" : "False", "@Color" : "#FF000000"
}, { "@IsItalic" : "False", "@FontFamily" : "Arial", "@Size" : "11", "@Id" : "LegendFontFooter", "@IsBold" : "False", "@Color" : "#FF000000" }, {
"@IsItalic" : "False", "@FontFamily" : "Lucida Grande", "@Size" : "13.333000183105469", "@Id" : "ToolTipFont", "@IsBold" : "False", "@Color" : "#918F8D" } ], "MapToolTip" : {
"@Background" : "#FFFFFFFF", "@MaskText" : "{%Name}", "@BorderRadius" : "2", "@Font" : "{ToolTipFont}", "@Padding" : "5 5 5 5", "@HoverMode" : "MouseOver", "@BorderThickness" : "1", "@NoDataText" : "no data", "@Id" : "MainToolTipStyle", "@BorderColor" : "#FFC1C1C1"
}, "BorderEffect" : { "@BorderThickness" : "1", "@Id" : "BorderEffectDefault", "@BorderColor" : "Orange" }, "MapLabel" : { "@MaskText" : "{0}: {1:#,##0.00}",
"@Padding" : "2 2 2 2", "@Font" : "{MapFont}", "@Id" : "MainLabelStyle", "@TextWrapping" : "NoWrap" } }, "MapLayers" : { "MapLayer" : [
{ "@Id" : "Background" }, { "@ToolTip" : "{MainToolTipStyle}", "@Id" : "Regions", "@Effect" : "{BorderEffectDefault}" }, { "@Id" : "Water"
}, { "@Id" : "SmallRivers" }, { "@Id" : "BigRivers" }, { "@Id" : "Lakes" },
{ "@Id" : "Cities" }, { "@Id" : "Railways" } ] }, "MapLegends" : {
"MapLegend" : { "@LessFormat" : "less than {0:#,##0.00}", "@Width" : "0", "@Background" : "#80FFFFFF", "@EqualFormat" : "equal to {0:#,##0.00}", "@Marker" : "Circle", "@NoDataVisible" : "TRUE", "@BorderRadius" : "0", "@Visibility" : "Visible"
"@HorizontalAlignment" : "Left", "@IsOuter" : "False", "@TextWrapping" : "NoWrap", "@IncludeEquals" : "False", "@GreaterFormat" : "greater than {0:#,##0.00}", "@BetweenFormat" : "from {0:#,##0.00} to {1:#,##0.00}", "@ColumnCount" : "8", "@Font" : "{LegendFont}", "@Padding" : "3 0 3 0", "@VerticalAlignment" : "Top"
"@Height" : "0", "@NoDataText" : "no data", "@Margin" : "6 6 6 6", "MapLegend.Header" : { "MapLabel" : { "@Background" : "#00000000", "@MaskText" : "{0}", "@Text" : ""
"@Font" : "{LegendFontHeader}", "@TextWrapping" : "NoWrap" } }, "MapLegend.Footer" : { "MapLabel" : { "@Background" : "#00000000", "@MaskText" : "{0}",
"@Text" : "", "@Font" : "{LegendFontFooter}", "@TextWrapping" : "NoWrap" } } }, "SizeLegend" : { "@Background" : "#80FFFFFF", "@Width" : "0",
"@BorderRadius" : "0", "@Font" : "{LegendFont}", "@Padding" : "3 0 3 0", "@Visibility" : "Collapsed", "@ItemFormat" : "#,##0.00", "@Height" : "0", "@VerticalAlignment" : "Center", "@HorizontalAlignment" : "Right", "@IsOuter" : "False", "@Margin" : "6 6 6 6",
"MapLegend.Header" : { "MapLabel" : { "@Background" : "#00000000", "@MaskText" : "{0}", "@Text" : "", "@Font" : "{LegendFontHeader}", "@TextWrapping" : "NoWrap" }
} } }, "MapTerritoryTranscript" : { "@Width" : "0", "@Background" : "#80FFFFFF", "@ParentLayer" : "{Regions}", "@Visibility" : "Collapsed", "@HorizontalAlignment" : "Relative",
"@BorderThickness" : "1", "@Left" : "0.01", "@SortingMode" : "Asc", "@TextWrapping" : "NoWrap", "@Top" : "0.65", "@Padding" : "2 2 2 2", "@Font" : "{MapTerritoryTranscriptFont}", "@ColumnCount" : "0", "@Height" : "0", "@VerticalAlignment" : "Relative",
"@HighlightBrush" : "#800000FF", "@BorderColor" : "#FF000000", "@MaxItemCount" : "0" } } }, "topobaseOd" : { "@isShortcut" : "0", "@isLink" : "0",
"i" : "OBJ1533", "n" : "RF.tbs", "k" : "1533", "c" : "3330", "p" : "51", "h" : "0" }, "options" : "[{"Name": "mapmaster.timelinepanel.currentstep","Value": 0},{"Name": "mapmaster.signaturespanel.columnscount","Value": 8},{"Name": "mapmaster.stylespanel.enableborder","Value": false},{"Name": "mapmaster.stylespanel.borderthickness","Value": 0},{"Name": "mapmaster.stylespanel.border","Value": "#000000"},{"Name": "mapmaster.stylespanel.background","Value": {"SolidColorBrush": {"@Color": "#ffffff","@Opacity": 0.501960813999176}}},{"Name": "mapmaster.stylespanel.fontfamily","Value": "Arial"},{"Name": "mapmaster.stylespanel.fontsize","Value": 21.3333339691162},{"Name": "mapmaster.stylespanel.isbold","Value": false},{"Name": "mapmaster.stylespanel.isitalic","Value": false},{"Name": "mapmaster.stylespanel.isunderline","Value": false},{"Name": "mapmaster.stylespanel.fontcolor","Value": "#000000"}]" } } }
public static GetMapResult GetMap(EaxId eax) { var somClient = new SomPortTypeClient(); //Proxy object for operation execution //Operation execution parameters var tArg = new GetMap() { tArg = new GetMapArg() { pattern = new MapMdPattern() { All = false, DataSource = false, Visual = true } }, tMap = new MapId() { id = eax.id + "!Map" } }; //Get map metadata var tResult = somClient.GetMap(tArg); return tResult; }
See also: