SetMapResult SetMap(MapId tMap, SetMapArg tArg)
tMap. Map moniker.
tArg. Parameters for changing metadata.
The SetMap operation changes map metadata.
To execute the operation, specify map moniker in the tMap parameter, and parameters of metadata change 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.
The object must be opened for edit.
Specify metadata to be changed in the tArg.meta field. It is possible to specify a pattern in the tArg.metaGet field, according to which map metadata is obtained after it is changed.
The operation results in the moniker of changed map and metadata if the tArg.metaGet field is defined.
Below is the example of using the SetMap operation to change express report map parameters. The request contains map moniker and changed metadata.
{ "SetMap" : { "tMap" : { "id" : "S1!M!S!E1!Map" }, "tArg" : { "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 {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" : "false", "@isLink" : "false", "i" : "OBJ1533", "n" : "RF.tbs", "k" : "1533", "c" : "3330", "p" : "51", "h" : "false" }, "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"}]" } } } },
{ "SetMapResult" : { "id" : { "id" : "S1!M!S!E1!Map" } } }
public static SetMapResult SetMap(EaxId eax, MapMd newMapMd)
{
// Specify obtained chart
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tArg = new SetMap()
{
tArg = new SetMapArg()
{
meta = newMapMd
},
tMap = new MapId()
{
id = eax.id + "!Map"
}
};
//Get map metadata
var tResult = somClient.SetMap(tArg);
return tResult;
}
See also: