You can provide styling properties for your military symbology icons and tactical graphics through the style option of your constructor options. Styling properties can depend on feature or paintState.

For icons, there are some basic style properties: basic icon style properties in action

  • iconSize: defines the size (in pixels) of the edge of the square fitting the icon.
  • affiliationColor: to override default affiliationColors.
  • haloColor: to define the color of a halo, for increased visibility of your icons.
  • haloWidth: to define the width of a halo, for increased visibility of your icons.
  • selectionColor: to define the color used for the selection rectangle when selecting an icon.
  • rectangle: to add a rectangle around your icon. You can use this as selection style.
  • maxRatioMovementDirectionArrow: to redefine the max Ratio (which is "10").
  • labelStyleGroup: to define a group name or number for your labels. With "NON_DECLUTTERED" as group name, you disable decluttering. See also: LabelStyle.group
  • bloom: to define a style, which is picked up on WebGL maps only.

There is also a set of more advanced icon style properties: advanced icon style properties in action

  • symbolIcon: to disable the symbol inside an icon.
  • symbolFrameEnabled: to disable the frame of an icon.
  • symbolFill: to remove the fill of an icon (the frame takes over the affiliationColor).
  • symbolFillPercentage: to only partially fill the icon.
  • affiliationColorEnabled: to remove the affiliation color for some specific icons.
  • color: to customise the line-color for unframed icon symbols, line symbols, off-set lines of icon symbols and for movement direction arrows.

Some style properties are specific to tactical graphics:

  • lineWidth: to customise the width of the lines.
  • affiliationColor: to override default affiliationColors.
  • draped: to choose whether this symbol should be draped on top of the terrain (see ShapeStyle).
  • cornerSmoothness: to round corners, with a value between 0 (no rounding) and 1 (fully rounded).
  • haloColor: to define the color of a halo, for increased visibility of your symbols.
  • haloWidth: to define the width of a halo, for increased visibility of your symbols.
  • affiliationColorEnabled: to remove the affiliation color for some specific icons.
  • selectionColor: defines the color used for the lines when selecting a symbol.
  • body: renders a full-body tactical graphic (true by default).
  • skeleton: renders a skeleton tactical graphic. You can use this skeleton as a selection style for WebGL maps, to improve selection response of the map.
  • bloom: to define a bloomStyle, which is picked up on WebGL maps only.

Hierarchy

  • MilSymStyle

Properties

affiliationColor?: AffiliationColorMap

To override default affiliationColors, provide colors as a map. Only the affiliation values for which you provide a color will override the default color.

Default

{@link AffiliationColorMap AffiliationColorMap}.
affiliationColorEnabled?: boolean

To remove the affiliation color for an icon.

Default

true

Since

2022.0

bloom?: BloomStyle

To define a style, which is picked up on WebGL maps only. Default value: undefined

Since

2022.1

body?: boolean

If you want to render a tactical graphic completely accurately, using complex strokes and decorations. Possible disadvantage: on a webGL map, fully rendering the tactical graphic means that a shader needs to be compiled, which might lead to a delay in rendering. For more information, see performance boosters on a webGL map. If both body and skeleton are set to false, a warning is issued and body is overriden with true.

Default

true

Since

2022.0.03

color?: string

To customise the line-color for unframed icon symbols, line symbols, off-set lines of icon symbols and for movement direction arrows. Default value: white "#FFFFFF"

Since

2023.0

cornerSmoothness?: number

To get rounded corners on lines of tactical graphics, with a value between 0 (no rounding) and 1 (fully rounded). Applied only when allowed. Tactical graphics that are supposed to have sharp edges will not get rounded.

Default

0

Since

2021.0

drapeTarget?: DrapeTarget

Whether you want your military symbols to be draped on top of the terrain or a 3D tiles mesh (or both).

This setting is only relevant for 3D maps and is ignored for 2D maps.

Default

a shape is only draped (on {@link DrapeTarget.TERRAIN terrain}) if it has undefined or zero Z.

Since

2022.1

draped?: boolean

Whether you want your military symbols to be draped on top of the terrain or not.

This property only exists for backwards compatibility. You should use drapeTarget instead. false is equivalent to DrapeTarget.NOT_DRAPED and true is equivalent to DrapeTarget.TERRAIN.

This setting is only relevant for 3D maps and is ignored for 2D maps.

Default

a shape is only draped (on {@link DrapeTarget.TERRAIN terrain}) if it has undefined or zero Z.

Deprecated

Use drapeTarget instead.

haloColor?: string

To define the color of a halo, for increased visibility of your symbols (both icons and tactical graphics). Only if both the width and the color get a value different from the default, a halo will be drawn.

Default

white

Since

2021.0

haloWidth?: number

To define the width (in pixels) of a halo, for increased visibility of your symbols (both icons and tactical graphics). Only if both the color and the width get a value different from the default, a halo will be drawn.

Default

1

Since

2021.0

iconSize?: number

Defines the size (in pixels) of the icon (width and height).

Default

64
labelPosition?: LabelPosition

Sets the relative position of the label with respect to the object. Only used for freeform polygon-shaped tactical graphics without a predefined position.

Default

"center"

Since

2023.0

labelStyleGroup?: string | number

By default, labels are decluttered. Set this to "NON_DECLUTTERED" to stop decluttering labels. See also: LabelStyle.group Default value: undefined

Since

2022.0.03

lineWidth?: number

To customize the width of the lines in tactical graphics.

Default

2
maxRatioMovementDirectionArrow?: number

The length of the movement direction arrow is, by default, between 1 (min) and 10 (max) times the defined iconSize. This parameter allows you to redefine the max ratio. The length in pixels of your speed leader is calculated as speed(m/s)xspeedLeaderLengthRatioxiconSize and is clipped between 1xiconSize and maxRatioMovementDirectionArrowxiconSize.

Default

10

Since

2022.0

rectangle?: boolean

If you want to add a rectangle around your icon, you can use this in your selection style. When you use it as a selection style, it will be colored using the selection color.

Default

true for {@link PaintState.selected paintState selected}.

Since

2022.0.03

selectionColor?: string

Defines the color used for the selection rectangle displayed when an icon is selected. Defines the color used for the tactical graphic styled as body or skeleton when a symbol gets selected.

Default

"#FF9900"
skeleton?: boolean

If you want to render a tactical graphic in a simplified style, using simple lines and no decorations. Possible usage:

  • To pre-load tactical graphics on a webGL map, to get immediate feedback while waiting for all shader compilation work to complete. For more information, see performance boosters on a webGL map.
  • As a style for selection. On a webGL map, skeleton styling results in an immediate response upon selection, and prevents delays while waiting for a new shader compilation. When used as a selection style, the skeleton will be colored using the selection color.
To get a sense of the advantages of this styling property, try it out in the AllSymbols sample on a WebGL map. If both body and skeleton are set to false, a warning is issued and body is overriden with true.

Default

false

Since

2022.0.03

speedLeaderLengthRatio?: number

The ratio of the speed leader to the symbol size against the speed value of 1m/s. The length in pixels of your speed leader is calculated as speed(m/s)xspeedLeaderLengthRatioxiconSize and is clipped between 1xiconSize and maxRatioMovementDirectionArrowxiconSize.

Default

0.05

Since

2022.0.05

symbolFill?: boolean

To remove the fill of an icon (the frame takes over the affiliationColor).

Default

true

Since

2022.0

symbolFillPercentage?: number

To only partially fill the icon, value between 0 (no fill) and 1 (fully filled).

Default

1

Since

2022.0

symbolFrameEnabled?: boolean

To disable the frame of an icon. Default value: true

Since

2022.0

symbolIcon?: boolean

To disable the symbol inside an icon.

Default

true

Since

2022.0