Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface MarkerTechniqueParams

Technique that describes icons with labels. Used in PoiTechnique and LineMarkerTechnique (for road shields).

Hierarchy

Index

Properties

Optional alwaysOnTop

alwaysOnTop: undefined | false | true

If true, the label will always be rendered on top.

remarks

If overlapping with other labels with this flag set, the render order is undefined.

defaultvalue

false

Optional backgroundColor

backgroundColor: DynamicProperty<StyleColor>

Text background color in hexadecimal or CSS-style notation, for example: "#e4e9ec", "#fff", "rgb(255, 0, 0)", or "hsl(35, 11%, 88%)".

format

color-hex

Optional backgroundOpacity

backgroundOpacity: DynamicProperty<number>

Background text opacity value.

Optional backgroundSize

backgroundSize: DynamicProperty<number>

Size of the text background (pixels).

Optional canvasRotation

canvasRotation: DynamicProperty<number>

TextCanvas rotation (radians).

Optional category

category: DynamicProperty<string>

The category of this technique.

remarks

The category is used in conjunction with Theme.priorities to assign render orders to the objects created by this Style.

Optional color

Text color in hexadecimal or CSS-style notation, for example: "#e4e9ec", "#fff", "rgb(255, 0, 0)", or "hsl(35, 11%, 88%)".

format

color-hex

Optional constantHeight

constantHeight: DynamicProperty<boolean>

If true, geometry height won't be scaled on projection. Enable it for projections with variable scale factor (e.g. mercator) to avoid distortions in geometry with great heights and latitude spans. E.g. a large object with even height would look oblique to the ground plane on mercator unless this property is set to true.

defaultvalue

true for geometries stored at level less than 12.

Optional distanceScale

distanceScale: undefined | number

Scaling factor of icon. Defaults to 0.5, reducing the size ot 50% in the distance.

Optional enabled

enabled: DynamicProperty<boolean>

Runtime filtering of techniques.

Use with ['dynamic-properties'] operator for dynamic feature highlight, highlighig etc.

see

Picking example

Optional fadeFar

fadeFar: DynamicProperty<number>

Distance to the camera (0.0 = camera position, 1.0 = farPlane) at which the object has zero opacity and stops fading out. An undefined value disables fading.

Optional fadeNear

fadeNear: DynamicProperty<number>

Distance to the camera `(0.0 = camera position, 1.0 = farPlane) at which the object start fading out (opacity decreases).

Optional fontName

fontName: undefined | string

Name of the preferred Font to be used when rendering.

Optional fontStyle

fontStyle: "Regular" | "Bold" | "Italic" | "BoldItalic"

Glyph style to apply for the currently active Font.

Optional fontVariant

fontVariant: "Regular" | "AllCaps" | "SmallCaps"

Glyph variant to apply for the currently active Font.

Optional hAlignment

hAlignment: DynamicProperty<"Left" | "Center" | "Right">

Text position regarding the baseline.

note

The placements attribute may override the alignment settings.

Optional iconBrightness

iconBrightness: undefined | number

Icon brightness.

remarks

Factor that multiplies a color on top of the icon texture (and iconColor) with 0 being fully black as final output, 1 being the original rgb colors of the texture.

defaultvalue

1

Optional iconColor

iconColor: StyleColor

Icon color.

remarks

If specified, combined using multiplication with color value read from icon texture. Works best for grayscale or monochromatic textures.

Optional iconFadeTime

iconFadeTime: undefined | number

Fading time for icons in seconds.

Optional iconIsOptional

iconIsOptional: undefined | false | true

If true, text will appear even if the icon is blocked by other labels.

defaultvalue

false

Optional iconMaxZoomLevel

iconMaxZoomLevel: DynamicProperty<number>

Maximum zoomLevel at which to display the label icon. No default.

Optional iconMayOverlap

iconMayOverlap: undefined | false | true

If false, the icon may overlap text and other icons of lower priority.

remarks

If not defined, the property value from textMayOverlap will be used.

defaultvalue

false

Optional iconMinZoomLevel

iconMinZoomLevel: DynamicProperty<number>

Minimum zoomLevel at which to display the label icon. No default.

Optional iconReserveSpace

iconReserveSpace: undefined | false | true

If false, icon will not reserve screen space, other markers will be able to overlap.

remarks

If not defined, the property value from iconReserveSpace will be used.

defaultvalue

true

Optional iconScale

iconScale: undefined | number

Scaling factor of icon.

Optional iconXOffset

iconXOffset: DynamicProperty<number>

Horizontal offset (to the right) in screen pixels.

Optional iconYOffset

iconYOffset: DynamicProperty<number>

Vertical offset (up) in screen pixels.

Optional id

id: undefined | string

The name used to identify materials created from this technique.

Optional imageTexture

imageTexture: DynamicProperty<string>

The name of either the ImageTexture in Theme.imageTextures or the user image cached in {@link @here/harp-mapview#userImageCache} to be rendered as marker.

Optional imageTextureField

imageTextureField: undefined | string

Field name to extract imageTexture content from, if imageTexture refers to an ImageTexture definition.

Optional imageTexturePostfix

imageTexturePostfix: undefined | string

Postfix for imageTexture if imageTextureField is used.

Optional imageTexturePrefix

imageTexturePrefix: undefined | string

Prefix for imageTexture if imageTextureField is used.

Optional kind

Specified kind of geometry.

remarks

One kind is set as default in the technique, and can be overridden in the style.

deprecated

Use enabled with expressions based on ['dynamic-properties'] operator. See "object picking" example.

Optional label

label: undefined | string

Field name of object containing the text to be rendered.

deprecated

Use ["get", "FIELD"].

Optional leading

leading: DynamicProperty<number>

Inter-line spacing (pixels). Scaled by size.

Optional lineRotation

lineRotation: DynamicProperty<number>

Line typesetting rotation (radians).

Optional lineWidth

lineWidth: DynamicProperty<number>

Maximum line width (pixels).

Optional maxLines

maxLines: DynamicProperty<number>

Maximum number of lines for this label.

Optional maxZoomLevel

maxZoomLevel: DynamicProperty<number>

Maximum zoom level. If the current zoom level is equal to or greater, the technique will not be used.

Optional minDistance

minDistance: undefined | number

Minimal distance between markers in screen pixels.

Optional minZoomLevel

minZoomLevel: DynamicProperty<number>

Minimal zoom level. If the current zoom level is smaller, the technique will not be used.

Optional opacity

opacity: DynamicProperty<number>

For transparent text, set a value between 0.0 for totally transparent, to 1.0 for totally opaque.

Optional placements

placements: undefined | string

Text label positions relative to the label central position (anchor point).

remarks

This attribute defines a comma separated tokens of possible text placements relative to label central position (anchor), for example: "TL, TR, C". Keep in mind that horizontal placement defines text position in opposite way to the alignment, so the text R placed (located on the right side of label position) will be the same as Left aligned by deduction. On other side vertical placement is quite similar to vertical alignment so T placement corresponds with Above alignment.

note

This attribute may override hAlignment and vAlignment if defined.

Optional poiName

poiName: undefined | string

Fixed name to identify POI options in the POI table.

remarks

If poiName has a value, this value supersedes any value read from the field referenced in poiNameField.

Optional poiNameField

poiNameField: undefined | string

Name of the field to evaluate to get the name of the POI options in the POI table.

Optional poiTable

poiTable: undefined | string

Name of the POI table which should be used for this POI.

Optional priority

priority: DynamicProperty<number>

Priority of marker, defaults to 0. Markers with highest priority get placed first.

Optional renderOrder

renderOrder: DynamicProperty<number>

The render order of the objects created using this technique.

remarks

If not specified in style file monotonically increasing values according to style position in file.

Optional renderTextDuringMovements

renderTextDuringMovements: undefined | false | true

If false, text will not be rendered during animations. Defaults to true.

Optional rotation

rotation: undefined | number

Glyph local rotation (radians).

Optional screenHeight

screenHeight: DynamicProperty<number>

Vertical height in pixels, controls vertical scaling. Overrides iconScale.

Optional screenWidth

screenWidth: DynamicProperty<number>

Horizontal height in pixels, controls horizontal scaling. Overrides iconScale.

Optional showOnMap

showOnMap: undefined | false | true

Should be displayed on map or not. Defaults to true.

Optional side

side: DynamicProperty<number>

Defines which side of faces will be rendered - front, back or both. See https://threejs.org/docs/#api/en/materials/Material.side.

Optional size

size: DynamicProperty<number>

Size of the text (pixels).

Optional stackMode

stackMode: PoiStackMode

Specify stack mode. Defaults to ShowInStack.

Optional style

style: undefined | string

Name of the text style.

Optional text

text: DynamicProperty<string>

Text to be displayed for feature.

remarks

Defaults to first defined:

  • feature property label if present in technique (deprecated)
  • ["get", "name:short"] is useAbbreviation is true
  • ["get", "iso_code"] is useIsoCode is true
  • ["get", "name:$LANGUAGE"] for each specified language
  • ["get", "name"]

See [[ExtendedTileInfo.getFeatureText]]

Optional textFadeTime

textFadeTime: undefined | number

Fading time for labels in seconds.

Optional textIsOptional

textIsOptional: undefined | false | true

If true, icon will appear even if the text part is blocked by other labels.

remarks
defaultvalue

false

Optional textMaxZoomLevel

textMaxZoomLevel: DynamicProperty<number>

Maximum zoomLevel at which to display the label text. No default.

Optional textMayOverlap

textMayOverlap: undefined | false | true

If false, text may overlap markers.

defaultvalue

false

Optional textMinZoomLevel

textMinZoomLevel: DynamicProperty<number>

Minimum zoomLevel at which to display the label text. No default.

Optional textReserveSpace

textReserveSpace: undefined | false | true

If false, text will not reserve screen space, other markers will be able to overlap.

defaultvalue

true

Optional tracking

tracking: DynamicProperty<number>

Inter-glyph spacing (pixels). Scaled by size.

Optional transient

transient: boolean | Pickability

Optional. If true or Pickability.transient, no IDs will be saved for the geometry this style creates. Default is Pickability.onlyVisible, which allows all pickable and visible objects to be picked, Pickability.all, will also allow invisible objects to be picked.

defaultvalue

Pickability.onlyVisible The boolean option is for backwardscompatibilty, please use the Pickability.

TODO: deprecate and rename to something that makes more sense

Optional transparent

transparent: DynamicProperty<boolean>

Set to 'true' if line should appear transparent.

remarks

Rendering transparent lines may come with a slight performance impact. See https://threejs.org/docs/#api/en/materials/Material.transparent.

Optional useAbbreviation

useAbbreviation: undefined | false | true

If true, the abbreviation (field name:short) of the elements is used as text.

deprecated

Use proper expression with [get, name:short] for this purpose.

Optional useIsoCode

useIsoCode: undefined | false | true

If true, the iso code (field 'iso_code') of the elements is used as text. The iso_code field contains the ISO 3166-1 2-letter country code.

deprecated

Use proper expression with [get, iso_code] for this purpose.

Optional vAlignment

vAlignment: DynamicProperty<"Above" | "Center" | "Below">

Text position inside a line.

note

The placements attribute may supersede it.

Optional worldOffset

worldOffset: DynamicProperty<number>

World space offset in meters applied to the icon along the ground plane, i.e. tangent to the local space up vector.

remarks

Valid only for icons which have the "offset_direction" property as an attribute of the data, which specifies an angle in degrees in which direction the offset should take place, i.e. 0 degrees is north, 90 is east etc.

Optional wrappingMode

wrappingMode: DynamicProperty<"None" | "Character" | "Word">

Wrapping (line-breaking) mode.

Optional xOffset

xOffset: DynamicProperty<number>

Horizontal offset (to the right) in screen pixels.

Optional yOffset

yOffset: DynamicProperty<number>

Vertical offset (up) in screen pixels.

Generated using TypeDoc