Styling visual appearance for draw objects

From Maria GDK Wiki
Jump to navigation Jump to search

The style set for the visual appearance has three style categories: DrawObjects, SelectionFan and Tooltip. Each category has a set of predefined styles. The name of the value items and composite value items in the styles have specific meaning and cannot be changed. Changing the value of the value items on the other hand will change the appearance of the draw objects.

A complete style set for draw objects can be found here: Draw object complete style set

DrawObjects style category

This style category has several styles for controling the appeatance of the draw objects and the tools for interacting with the draw objects.

Styling draw object appearance

The main style which controls the appearance of the draw objects has some top level value items and several composite items.

Most of the value items shown bellow use variables to define the actual value to be used for the appearance of the draw object. This means that the value is retrieved from the fields of the draw object when the style is resolved for a draw object.

Some of the value items also have a factor attribute which is defined as the variable AlphaFactor. This factor value retrieved from the draw object's fields controls the opactity applied to the colors of the draw object.

The top level value items control the overall coloring of the draw objects:

<valueitem name="ColorScheme" value="Medium"/>
<valueitem name="OverrideColor" value=""/>
Name Description
ColorScheme Controls the colors used for MIL-STD-2525C objects and can be: Dark, Medium or Light
OverrideColor Used to override the color scheme for MIL-STD-2525C objects and can be: Black, White or DarkGray

The appearance of draw object lines, such as thickness and color, is controlled by the composite item Line:

<compositeitem name="Line">
  <valueitem name="Width" value="[LineWidth]" />
  <valueitem name="Color" value="[LineColor]" factor="[AlphaFactor]" />
  <valueitem name="ColorLight" value="[LineColor]" factor="[AlphaFactor]" />
  <valueitem name="ColorMedium" value="[LineColor]" factor="[AlphaFactor]" />
  <valueitem name="ColorDark" value="[LineColor]" factor="[AlphaFactor]" />
  <valueitem name="BeginScaleStep" value="1.0" />
  <valueitem name="EndScaleStep" value="1.0" />
  <valueitem name="DashStyle" value="[LineDashStyle]"/>
  <valueitem name="ShowLinePointText" value="[ShowLinePointText]"/>
</compositeitem>
Name Description
Width Thickness of draw object lines.
Color Color for generic draw object lines.
ColorLight Light color for MIL-STD-2525C draw object lines.
ColorMedium Medium color for MIL-STD-2525C draw object lines.
ColorDark Dark color for MIL-STD-2525C draw object lines.
BeginScaleStep The scaling value of the line figure (arrow etc.) at the beginning of the line.
EndScaleStep The scaling value of the line figure (arrow etc.) at the end of the line.
DashStyle Dash style for draw object lines. Values are as defined by .NET. For example the value "4,6" would give a line where each dash is 4 times the thickness of the line and each gap is 6 times the thickness of the line.
ShowLinePointText Indicates if the text associated with a line's points (the text must be set on the draw object's point primitives) should be shown. Values can be: true or false.

Some draw objects show text as part of the draw object. The composite item DefaultFont controls the appearance of the font for this text:

<compositeitem name="DefaultFont">
  <valueitem name="Bold" value="[BoldFont]"/>
  <valueitem name="Italic" value="[ItalicFont]"/>
  <valueitem name="Underline" value="[UnderlineFont]"/>
  <valueitem name="Strikethrough" value="[StrikethroughFont]"/>
  <valueitem name="Font" value="[DefaultFontName]"/>
  <valueitem name="Size" value="[DefaultFontSize]" factor="[ViewFontScale]"/>
  <valueitem name="Color" value="[DefaultFontForegroundColor]" factor="[AlphaFactor]"/>
  <valueitem name="BackgroundColor" value="[DefaultFontBackgroundColor]" factor="[AlphaFactor]"/>
  <valueitem name="MinFontSize" value="[MinFontSize]"/>
  <valueitem name="MinFontMapScale" value="[MinFontMapScale]"/>
  <valueitem name="MaxFontMapScale" value="[MaxFontMapScale]"/>
  <valueitem name="CustomFontScale" value="[CustomFontScale]"/>
</compositeitem>
Name Description
Bold Sets bold font. Values are true or false.
Italic Sets italic font. Values are true or false.
Underline Sets underline font. Values are true or false.
Strikethrough Sets strikethrough font. Values are true or false.
Font Font name.
Size Font size.
Color Font color.
BackgroundColor Color used as a background for the text to increase readability.
MinFontSize Minimum font size used to scale text when custom font scaling is enabled.
MinFontMapScale Minimum map scale used to scale text when custom font scaling is enabled.
MaxFontMapScale Maximum map scale used to scale text when custom font scaling is enabled.
CustomFontScale Enables custom font scaling and applies to generic objects. Values are true or false. If set to true the text will be scaled between MinFontSize at MinFontMapScale and the actual font size (Size) at MaxFontMapScale, where MinFontSize, MinFontMapScale, and MaxFontMapScale are field values of the generic object. If MinFontMapScale and MaxFontMapScale are 0 (not set), for generic objects other than Generic Text, the text will be scaled as normal untill MinFontSize is reached.

Some draw objects use a smaler font than the normal default font. Examples are the range text of Range Rings and ALT text on Alternating Traffic. The composite item SmallLabelFont controls the appearance of this font:

<compositeitem name="SmallLabelFont">
  <valueitem name="Font" value="Arial" />
  <valueitem name="Size" value="10.0" />
</compositeitem>
Name Description
Font Font name.
Size Font size.

Some draw objects have an echelon indicator representing the command level. A separate font is used for the echelon indicator and the composite item EchelonFont controls the appearance of this font:

<compositeitem name="EchelonFont">
  <valueitem name="Font" value="Arial" />
  <valueitem name="Size" value="24.0" />
</compositeitem>
Name Description
Font Font name.
Size Font size.

A few draw objects such as Generic Crosshairs use a separate font for the text associated with the draw object. The composite item LabelFont controls the appearance of this font:

<compositeitem name="LabelFont">
  <valueitem name="Font" value="Arial" />
  <valueitem name="Size" value="10.0" />
  <valueitem name="BackgroundColor" value="[DefaultFontBackgroundColor]" factor="[AlphaFactor]"/>
</compositeitem>
Name Description
Font Font name.
Size Font size.
BackgroundColor Color used as a background for the text to increase readability.

Generic draw objects that define an area can be filled with a pattern. The composite item Fill controls the appearance of the fill pattern:

<compositeitem name="Fill">
  <valueitem name="ForegroundColor" value="[FillForegroundColor]" factor="[AlphaFactor]" />
  <valueitem name="BackgroundColor" value="[FillBackgroundColor]" factor="[AlphaFactor]" />
  <valueitem name="Style" value="[FillStyle]"/>
</compositeitem>
Name Description
ForegroundColor Color of the fill pattern.
BackgroundColor Background color of the fill pattern.
Style Fill pattern, where values can be: None, Solid, BackwardDiagonal, ForwardDiagonal, Horizontal, Vertical, Cross, DiagonalCross

Generic polyarea and polyline draw objects can have a buffer around the draw object. The composite item Buffer controls the appearance of the buffer:

<compositeitem name="Buffer">
  <valueitem name="Width" value="[BufferLineWidth]" />
  <valueitem name="Color" value="[BufferLineColor]" factor="[AlphaFactor]" />
  <valueitem name="DashStyle" value="[BufferLineDashStyle]"/>
</compositeitem>
Name Description
Width Thickness of buffer line.
Color Color of buffer line.
DashStyle Dash style for buffer lines. Values are as defined by .NET. For example the value "4,6" would give a line where each dash is 4 times the thickness of the line and each gap is 6 times the thickness of the line.

Point symbol draw objects can have labels around the symbol. The layout of the individual labels follows the MIL-STD-2525C standard. The composite item Label controls the appearance of the labels:

<compositeitem name="Label">
  <valueitem name="Draw" value="[DrawLabel]"/>
  <valueitem name="DrawMovementIndicator" value="[DrawMovementIndicator]"/>
  <valueitem name="MovementIndicatorColor" value="[MovementIndicatorColor]" factor="[AlphaFactor]"/>
  <valueitem name="DrawOffsetLocationIndicator" value="[DrawOffsetLocationIndicator]"/>
  <valueitem name="OffsetLocationIndicatorColor" value="[OffsetLocationIndicatorColor]" factor="[AlphaFactor]"/>
  <valueitem name="Font" value="[LabelFontName]"/>
  <valueitem name="Bold" value="[LabelFontBold]"/>
  <valueitem name="Italic" value="[LabelFontItalic]"/>
  <valueitem name="Size" value="[LabelFontSize]"/>
  <valueitem name="Color" value="[LabelFontForegroundColor]" factor="[AlphaFactor]"/>
</compositeitem>
Name Description
Draw Sets the label visibility. Values are true or false.
DrawMovementIndicator Sets the movement indicator visibility. Values are true or false.
MovementIndicatorColor Color of the movement indicator.
DrawOffsetLocationIndicator Sets the offset location indicator visibility. Values are true or false.
OffsetLocationIndicatorColor Color of the offset location indicator.
Font Label font name.
Size Label font size.
Bold Sets bold label font. Values are true or false.
Italic Sets italic label font. Values are true or false.
Color Label font color.

It is also possible to override the MIL-STD-2525C layout of the labels and specify the layout in the composite item Label instead:

<compositeitem name="Label">
 
  <!-- The value items for MIL-STD-2525C labels must also 
       be included in addition to the items bellow -->
  
  <valueitem name="GenericLabel" value="[GenericLabel]" />
  <valueitem name="Separator" value="-" />
  <compositeitem name="LabelText1">
    <valueitem name="Fields" value="field1" />
    <valueitem name="Position" value="TopLeft" />
    <valueitem name="XOffset" value="0.0" />
    <valueitem name="YOffset" value="0.0" />
  </compositeitem>
  <compositeitem name="LabelText2">
    <valueitem name="Fields" value="field2,field3" />
    <valueitem name="Position" value="Bottom" />
    <valueitem name="XOffset" value="0.0" />
    <valueitem name="YOffset" value="0.0" />
  </compositeitem> 
</compositeitem>
Name Description
GenericLabel Sets genric labeling mode. Values are true or false. A value of true will enable generic labeling.
Separator Character used to separate several fields when multiple fields are combined into one label.
LabelText Defines a label item. Label composite items must start with the name LabelText. \ \ <WRAP leftalign>
Fields A comma separated list of draw object fields to show as the label.
Position Position of the label. Values are: Left, Right, Top, Bottom, TopLeft, TopRight, BottomLeft, BottomRight
XOffset Horizontal offset of the label from its position in pixels.
YOffset Vertical offset of the label from its position in pixels.
</WRAP>

The appearance of point symbol draw objects is controlled by the composite item Symbol:

<compositeitem name="Symbol">
  <valueitem name="Size" value="100.0" factor="[ViewSymbolScale]"/>
  <valueitem name="DynamicScale" value="true"/>
  <valueitem name="Grayscale" value="false"/>
  <valueitem name="Alpha" value="[AlphaFactor]"/>
  <valueitem name="DropShadow" value="false"/>
  <valueitem name="DropShadowColor" value="255,255,255,255"/>
</compositeitem>
Name Description
Size Symbol size in percentage. (The symbol size will be scaled by the view's symbol scale as well)
DynamicScale Sets if the symbol is scaled automatically according to the map scale. Values are true or false.
Grayscale Sets if the symbol is shown as gray scale. Values are true or false.
Alpha The symbol opacity. Values are between 0 and 1.
DropShadow Sets if the symbol should have a drop shadow. Values are true or false.
DropShadowColor The color for the drop shadow.

The composite item Unrelated contains styling elements that by definition are unrelated to a specific styling area:

<compositeitem name="Unrelated">
  <valueitem name="SimplifiedRenderingCutoffSize" value="[SimplifiedRenderingCutoffSize]" />
  <valueitem name="DrawOutline" value="[DrawOutline]" />
  <valueitem name="Smooth" value="[Smooth]" />
  <valueitem name="DefaultScaleStep" value="0.1"/>
</compositeitem>
Name Description
SimplifiedRenderingCutoffSize The minimum size (width or height) in pixels of the draw object's bounding box before simplified rendering is enabled.
DrawOutline Sets if the outline for draw objects are shown. Currently only applies to filled FanAreas. Values are true or false.
Smooth Sets if lines are rendered as smooth, meaning the line segments will be curved between the actual points to give the line a smooth look. Values are true or false.
DefaultScaleStep Sets the scale step used by the tool for scaling a draw object's text.

Highlight shape of selected objects

The appearance of selected objects can be controlled using style.

Example to change width of line objects when selected:

   <style>
      <statecondition key="Selected" scope="PerItem" state="Active"/>
      <compositeitem name="Line">
        <valueitem name="Width" value="[LineWidth]" factor="2.75" />
      </compositeitem>
   </style>

Mark draw objects

Styled marking can be used to highlight generic polylines, polyareas, ellipses and crosshairs. Marking is nearly always used in combination with a condition. The marks consist of one or more layers surrounding the geometry of the draw object. The basic structure is as follows:

    <style>
      <compositeitem name="Mark">
        <compositeitem name="Layer1">
          <valueitem name="DashStyle" value="Solid"/>
          <valueitem name="Color" value="255,192,0,255"/>
          <valueitem name="Width" value="2.0"/>
          <valueitem name="Offset" value="5"/>
          <valueitem name="Draw" value="true"/>
        </compositeitem>
        <compositeitem name="Layer2">
          <valueitem name="DashStyle" value="Solid"/>
          <valueitem name="Color" value="112,48,160,255"/>
          <valueitem name="Width" value="2.0"/>
          <valueitem name="Offset" value="5"/>
          <valueitem name="Draw" value="true"/>
        </compositeitem>
        <compositeitem name="Layer3">
          <valueitem name="DashStyle" value="Solid"/>
          <valueitem name="Color" value="0,176,80,255"/>
          <valueitem name="Width" value="2.0"/>
          <valueitem name="Offset" value="5"/>
          <valueitem name="Draw" value="true"/>
        </compositeitem>
      </compositeitem>
    </style>
Name Description
DashStyle Dash style for mark layer. Values are as defined by .NET. For example the value "4,6" would give a line where each dash is 4 times the thickness of the line and each gap is 6 times the thickness of the line.
Color Color for mark layer.
Width Thickness of mark layer.
Offset The distance in pixels from the preceding mark layer or draw object geometry for the first mark layer.
Draw Sets the mark layer visibility. Values are true or false.

Conditional styles for draw object appearance

Draw objects that have a standard identity, the threat posed by the draw object, have colors according to the standard identity.

Individual styles represent the four basic standard identity categories: unknown, friend, neutral, and hostile. The standard identity styles modify the color value items of the composite item Line from the original style. A field condition, that uses the StandardIdentity value in the draw object's fields, is used to identify the different standard identity categories.

The style for the hostile standard identity category:

<style>
  <fieldcondition field="StandardIdentity" op="In" value="Hostile,AssumedHostile,Joker,Faker,Suspect" /> 
  <compositeitem name="Line">
    <valueitem name="Color" value="255,0,0,255" factor="[AlphaFactor]" />
    <valueitem name="ColorLight" value="255,128,128,255" factor="[AlphaFactor]" />
    <valueitem name="ColorMedium" value="255,48,49,255" factor="[AlphaFactor]" /> 
    <valueitem name="ColorDark" value="200,0,0,255" factor="[AlphaFactor]"/>
  </compositeitem>
</style>

The style for the unknown standard identity category:

<style>
  <fieldcondition field="StandardIdentity" op="In" value="Unknown,Pending" />
  <compositeitem name="Line">
    <valueitem name="Color" value="255,255,0,255" factor="[AlphaFactor]" />
    <valueitem name="ColorLight" value="255,255,128,255" factor="[AlphaFactor]" />
    <valueitem name="ColorMedium" value="255,255,0,255" factor="[AlphaFactor]" />
    <valueitem name="ColorDark" value="225,220,0,255" factor="[AlphaFactor]" />
  </compositeitem>
</style>

The style for the neutral standard identity category:

<style>statndard identityfield="StandardIdentity" value="Neutral" />
  <compositeitem name="Line">
    <valueitem name="Color" value="0,128,0,255" factor="[AlphaFactor]" />
    <valueitem name="ColorLight" value="170,255,170,255" factor="[AlphaFactor]" />
    <valueitem name="ColorMedium" value="0,226,0,255" factor="[AlphaFactor]" />
    <valueitem name="ColorDark" value="0,160,0,255" factor="[AlphaFactor]" />
  </compositeitem>
</style>

The style for the friend standard identity category:

<style>
  <fieldcondition field="StandardIdentity" op="In" value="Friend,AssumedFriend" />
  <compositeitem name="Line">
    <valueitem name="Color" value="0,0,255,255" factor="[AlphaFactor]" />
    <valueitem name="ColorLight" value="128,224,255,255" factor="[AlphaFactor]" />
    <valueitem name="ColorMedium" value="0,168,220,255" factor="[AlphaFactor]" />
    <valueitem name="ColorDark" value="0,107,140,255" factor="[AlphaFactor]" />
  </compositeitem>
</style>

Draw objects that have a status, which refers to wether the draw object exists at its location or will in the future exist at that location, have a line style according to the status.

Individual styles represent the two status categories: present, and planned. The status styles modify the dash style value item of the composite item Line from the original style. A field condition, that uses the TacticalStatus value in the draw object's fields, is used to identify the different status categories.

The style for the present status:

<style>
  <fieldcondition field="TacticalStatus" value="PresentPosition" />
  <compositeitem name="Line">
    <valueitem name="DashStyle" value="Solid"/>
  </compositeitem>
</style>

The style for the planned, anticipated, suspected, and on order status:

<style>
  <fieldcondition field="TacticalStatus" op="In" value="Anticipated,OnOrder,Planned,Suspected" />
  <compositeitem name="Line">
    <valueitem name="DashStyle" value="3,3@0" />
  </compositeitem>
</style>

When draw objects get disabled, they get a gray appearance. A separate style is used for the disabled state and modify the line and fill colors, and sets a gray scale mode for symbols. A field condition, that uses the runtime field Disabled, is used to identify the disabled state:

<style>
  <fieldcondition field="runtime.Disabled" value="true"/>
  <compositeitem name="Line">
    <valueitem name="Color" value="127,127,127,127" />
    <valueitem name="ColorLight"  value="127,127,127,127" />
    <valueitem name="ColorMedium"  value="127,127,127,127" />
    <valueitem name="ColorDark"  value="127,127,127,127" />
  </compositeitem>

  <compositeitem name="Symbol">
    <valueitem name="Grayscale" value="true" />
  </compositeitem>
  
  <compositeitem name="Fill">
    <valueitem name="ForegroundColor" value="127,127,127,127" />
    <valueitem name="BackgroundColor" value="127,127,127,127" />
  </compositeitem>      
</style>

There is also a style that hides the labels of a point symbol draw object during map pan operations. It is recommended to have this style because it gives the system better performance during a map pan operation:

<style>
  <mapstatecondition op="Eq" value="Changing" />
  <compositeitem name="Label">
    <valueitem name="Draw" value="false"/>
  </compositeitem>
</style>

Styling draw object tool appearance

Maria GDK contains a set of tools for editing draw objects visually on the map. These tools range from object scaling and moving to adding and deleting the points of the draw object, and more. All of these tools use a style to control their appearance.

The composite item Tool controls the general appearance of all the tools:

<compositeitem name="Tool">
  <valueitem name="LineColor" value="0,0,0,255"  />
  <valueitem name="Width" value="1.0" />
  <valueitem name="HandleRadius" value="4.0"/>
  <valueitem name="HandleDistance" value="25.0" />
</compositeitem>
Name Description
LineColor Color of the tool lines.
Width Thickness of the tool lines.
HandleRadius Radius of the tool handles used to interact with the tool.
HandleDistance Lenght of handle for rotating a draw object.

The composite item ToolGeoDecoration controls the decorations that the tools display, such as text and dipsplacement:

<compositeitem name="ToolGeoDecoration">
  <valueitem name="Color" value="128,128,128,255"  />
  <valueitem name="BackgroundColor" value="255,255,255,127" />
  <valueitem name="Width" value="2.0" />
  <valueitem name="Font" value="Arial" />
  <valueitem name="Size" value="12.0" />
</compositeitem>
Name Description
Color Line and text color for geo decorations.
BackgroundColor Color used as a background for the text to increase readability.
Width Thickness of geo decoration lines.
Font Font name for geo decoration text.
Size Font size for geo decoration text.

The composite item PointSquareHandle controls the colors of the tool handles:

<compositeitem name="PointSquareHandle">
  <valueitem name="NonSelectedColor" value="245,245,245,255" />
  <valueitem name="NonSelectedHoverColor" value="255,255,255,255" />
  <valueitem name="SelectedColor" value="255,255,0,255" />
  <valueitem name="SelectedHoverColor" value="255,255,225,255"/>
</compositeitem>
Name Description
NonSelectedColor Color of the unselected tool handle.
NonSelectedHoverColor Color of the unselected tool handle when the mouse pointer is over the tool handle.
SelectedColor Color of the selected tool handle.
SelectedHoverColor Color of the selected tool handle when the mouse pointer is over the tool handle.

The composite item ScaleTool controls the text scaling tool:

<compositeitem name="ScaleTool">
  <valueitem name="Width" value="25.0" />
  <valueitem name="Height" value="8.0"/>
</compositeitem>
Name Description
Width Width of the text scale arrow.
Height Height of the text scale arrow.

The composite item Rotate controls the rotation tool handle colors:

<compositeitem name="Rotate">
  <valueitem name="Color" value="212,255,212,255" />
  <valueitem name="HoverColor" value="241,255,241,255"/>
</compositeitem>
Name Description
Color Color of the rotation tool handle.
HoverColor Color of the rotation tool handle when the mouse pointer is over the tool handle.

The composite item AddTool controls the tool handles for the add points tool:

<compositeitem name="AddTool">
  <valueitem name="Radius" value="3.0" />
  <valueitem name="NonSelectedColor" value="212,255,212,255"  />
  <valueitem name="NonSelectedHoverColor" value="241,255,241"  />
  <valueitem name="SelectedColor" value="212,255,212,255"/>
</compositeitem>
Name Description
Radius Radius of the tool handles used to interact with the tool.
NonSelectedColor Color of the unselected tool handle.
NonSelectedHoverColor Color of the unselected tool handle when the mouse pointer is over the tool handle.
SelectedColor Color of the selected tool handle.

SelectionFan style category

When multiple draw objects can be selected at the same point by clicking on the map, a selection fan is displayed with all the draw objects that can be selected. The appearance of this selection fan is controlled by a style.

The value items at the root level of the style control the appearance of the actual fan control used to display the draw objects:

<valueitem name="InnerFanBackgroundColor" value="255,255,255,0"/>
<valueitem name="OuterFanBackgroundColor" value="255,255,255,200"/>
<valueitem name="FanBackgroundColor" value="255,255,255,0"/>
<valueitem name="EmptySymbolColor" value="200,200,200,255"/>
<valueitem name="OuterFanOutlineColor" value="0,0,0,100"/>
<valueitem name="OuterOutlineThickness" value="1"/>
<valueitem name="MaxCount" value="10"/>  
<valueitem name="OutlineColor" value="0,0,0,100"/>
<valueitem name="OutlineThickness" value="2"/>
Name Description
InnerFanBackgroundColor The inner color of the background gradient color.
OuterFanBackgroundColor The outer color of the background gradient color.
FanBackgroundColor The center color of the selection fan.
EmptySymbolColor Color used for a draw object if no preview for it exists.
OuterFanOutlineColor The outer outline color.
OuterOutlineThickness Line thickness of outer outline.
OutlineColor The inner outline color.
OutlineThickness Line thickness of inner outline.
MaxCount Maximum number of objects that the fan can show. If more than maximum number of objects can be selected, the fan will not be shown. This is to prevent the fan from being overcrowded.

The composite item Selected controls the appearance of the selection rectangle for selected draw objects in the fan:

<compositeitem name="Selected">    
  <valueitem name="Color" value="255,255,0,255"/>
  <valueitem name="Thickness" value="4.0"/>
</compositeitem>
Name Description
Color Color of selection rectangle.
Thickness Thickness of selection rectangle.

The composite item Label controls the appearance of the label that can be shown for the draw objects in the fan:

<compositeitem name="Label">    
  <valueitem name="FontSize" value="10"/>
  <valueitem name="FontName" value="Verdana"/>
  <valueitem name="Bold" value="false"/>
  <valueitem name="Italic" value="false"/>
  <valueitem name="Color" value="50,50,50,155"/>
  <valueitem name="Background" value="255,255,255,127"/>        
  <valueitem name="Show" value="false"/>
  <valueitem name="Fields" value="Name"/>
  <valueitem name="FieldSeparator" value="-"/>
</compositeitem>
Name Description
FontSize Font size.
FontName Font name.
Bold Sets bold label font. Values are true or false.
Italic Sets italic label font. Values are true or false.
Color Font color.
Background Color used as a background for the text to increase readability.
Show Sets the label visibility. Values are true or false.
Fields A comma separated list of draw object fields to show as the label.
FieldSeparator Character used to separate several fields when multiple fields are combined into one label.

Tooltip style category

When the mouse pointer is over a draw object, a tooltip for the draw object will be shown. The appearance of this tooltip is controlled by a style.

The root level value items of the style controls the tooltip's appearance:

<valueitem name="ShowDelay" value="500"/>
<valueitem name="HideDelay" value="5000"/>
<valueitem name="TopBackgroundColor" value="255,255,255,255"/>
<valueitem name="BottomBackgroundColor" value="228,228,240,255"/>
<valueitem name="OutlineColor" value="0,0,0"/>
<valueitem name="OutlineThickness" value="1"/>
<valueitem name="FontColor" value="0,0,0"/>
<valueitem name="FontFamilyName" value="Segoe UI"/>
<valueitem name="FontSize" value="10"/>
Name Description
ShowDelay Delay in milliseconds before the tooltip is shown.
HideDelay Delay in milliseconds before the tooltip is hidden.
TopBackgroundColor The top color of the background gradient color.
BottomBackgroundColor The bottom color of the background gradient color.
OutlineColor The outline color.
OutlineThickness Line thickness of the outline.
FontColor Font color.
FontFamilyName Font name.
FontSize Font size.

The tooltip can have multiple lines of text where each line is defined by a composite item which starts with the name TooltipLine:

<compositeitem name="TooltipLine1">
  <valueitem name="Label" value="Name:"/>
  <valueitem name="Fields" value="Name"/>
  <valueitem name="FieldSeparator" value="-"/>
</compositeitem>
Name Description
Label An optional label to show for the tooltip line.
Fields A comma separated list of draw object fields to show as the tooltip line.
FieldSeparator Character used to separate several fields when multiple fields are combined into one tooltip line.

Clustering style category

Draw object symbol clustering can be used to group draw object symbols based on six algorithms:

  • Grid clustering which divides the view into a grid and creates a cluster of all draw object symbols within a cell.
  • Sequential clustering which starts with one draw object symbol and clusters all draw object symbols around it which are within a range, then it moves on to the next unclustered draw object symbol and does the same.
  • Combined clustering which combines sequential and grid clustering. If the draw object symbol count in the current view is less than 10000 sequential clustering is used otherwise grid clustering is used.
  • Group clustering which groups draw object symbols based on a parent child relationship between draw object symbols.
  • Priority clustering which use sequential clustering and then sorts the clustered draw object symbols based on priority and shows only the draw object symbol with highest priority.
  • Symbol clustering which groups draw object symbols based on symbol type/code and the use sequential clustering to cluster items.

The appearance of the clusters is controlled by the following style:

<stylecategory name="DrawObjectClustering"/>
  <style>  
    <valueitem name="MinCount" value="2"/>
    <valueitem name="CanCluster" value="true"/>
    <valueitem name="ParentFieldID" value="GroupParent"/>
    <valueitem name="IDFieldID" value="id"/>  
    <valueitem name="BackgroundColor" value="0,128,255,100"/>
    <valueitem name="OutlineColor" value="0,0,0,150"/>
    <valueitem name="OutlineThickness" value="2"/>
    <valueitem name="OutlineColorAboveMaxCount" value="0,0,0,150"/>
    <valueitem name="OutlineThicknessAboveMaxCount" value="1"/>
    <valueitem name="BoundsBufferWidth" value="10"/>      
    <valueitem name="ShowSymbolLocation" value="true"/>
    <valueitem name="SymbolLocationRadius" value="1.0"/>
    <valueitem name="SymbolLocationColor" value="0,0,0,200"/>
    <valueitem name="SymbolAsSymbolLocation" value="false"/>
    <valueitem name="FontFamilyName" value="Segoe UI"/>
    <valueitem name="FontColor" value="255,255,255,255"/>
    <valueitem name="FontOutlineColor" value="0,0,0,255"/>
    <valueitem name="FontSize" value="11"/>           
    <valueitem name="ShowClusterCount" value="true"/>
    <valueitem name="ShowSymbol" value="true"/>
    <valueitem name="ShowSymbolSelection" value="false"/>
    <valueitem name="PriorityFieldID" value="Priority"/>
    <valueitem name="SymbolCountThreshold" value="15"/>
    <valueitem name="SymbolAutoSelectBackgroundColor" value="true"/>
    <valueitem name="SymbolAutoSelectFontColors" value="true"/>
    <valueitem name="SymbolCountPosition" value="TopRight"/>
    <valueitem name="SymbolCountOffsetX" value="5"/>
    <valueitem name="SymbolCountOffsetY" value="-5"/>
  </style>
</stylecategory>
Name Description
MinCount Minimum number of draw object symbols in a cluster before the draw object symbols are clustered.
CanCluster Sets if the draw object symbols can be clustered. Values are true or false.
ParentFieldID Name of the field used to specify the parent draw object symbol for a cluster when Group clustering is used.
IDFieldID If desired specifies a different ID field name than the default for the draw object symbol ID when Group clustering is used.
BackgroundColor The background color.
OutlineColor The outline color.
OutlineThickness Line thickness of outline.
OutlineColorAboveMaxCount The outline color for clusters where the cluster's fan cannot be displayed because the number of draw object symbols exceed the maximum number of draw object symbols for the fan. The maximum count can be set on the Selection fan style.
OutlineThicknessAboveMaxCount Line thickness of the outline for clusters where the cluster's fan cannot be displayed because the number of draw object symbols exceed the maximum number of draw object symbols for the fan. The maximum count can be set on the Selection fan style.
BoundsBufferWidth The minimum number of pixels between the draw object symbols and the boundary line for Bounds clustering.
ShowSymbolLocation Sets if the draw object symbol or location (colored circle) for clustered draw object symbols is displayed for Bounds clustering. Values are true or false.
SymbolLocationRadius The radius in pixels for draw object symbols and draw object symbol locations (colored circle) for Bounds clustering.
SymbolLocationColor The color of the draw object symbol locations (colored circle) for Bounds clustering.
SymbolAsSymbolLocation Sets if the draw object symbol for clustered draw object symbols is displayed instead of their location (colored circle) for Bounds clustering. Values are true or false.
FontFamilyName Font name for clustering count text.
FontColor Font color for clustering count text.
FontOutlineColor Font outline color for clustering count text.
FontSize Font size for clustering count text.
ShowClusterCount Sets if the draw object symbol count of a cluster is displayed at the center of the cluster. Values are true or false.
ShowSymbol Sets if a draw object symbol is displayed at the center of the cluster. Values are true or false.
ShowSymbolSelection Sets if selected draw object symbols should be displayed at their position even though they are clustered. Values are true or false.
PriorityFieldID Specifies the field name that contains the priority used for priority clustering.
SymbolCountThreshold The threshold (max count) before "threshold+" is shown for count for symbol clustering.
SymbolAutoSelectBackgroundColor Automatically use the most dominant symbol color as background for count for symbol clustering. Values are true or false.
SymbolAutoSelectFontColors Automatically set font color and font outline color, black/white or white/black, based on brightness of symbol for symbol clustering. Values are true or false.
SymbolCountPosition The anchor for symbol clustering count: TopRight, TopLeft, BottomLeft, BottomRight.
SymbolCountOffsetX The offset in X direction from anchor position for symbol clustering count.
SymbolCountOffsetY The offset in Y direction from anchor position for symbol clustering count.

Draw object clustering and clustering state

Each clustering algorithm has a state associated with it (this is set on the draw object layer in the application code). When a state for a clustering algorithm is set the styling can be conditionally changed for that algorithm.

The six states are:

  • drawobject.groupclustering Group clustering state
  • drawobject.gridclustering Grid clustering state
  • drawobject.sequentialclustering Sequential clustering state
  • drawobject.combinedclustering Combined clustering state
  • drawobject.priorityclustering Priority clustering state
  • drawobject.symbolclustering Symbol clustering state

As an example when the grid clustering state is set the following style will change the background color to red for Grid clustering.

<style>
  <statecondition key="drawobject.gridclustering" scope="PerItem" state="Active" />
  <valueitem name="BackgroundColor" value="255,0,0,100" />
</style>