Options
All
  • Public
  • Public/Protected
  • All
Menu

Style for raster layers.

For more information on how to style raster layers, see Learn how to visualize and style raster data using a RasterTileSetLayer.

Hierarchy

  • RasterStyle

Overview

Properties

Optional alpha

alpha: number

A number with an opacity value between 0 and 1. 0 is fully transparent t, 1 is fully opaque. By default, the value is 1.

Optional displacementExpression

displacementExpression: Expression<Vector3> | null

An expression to displace terrain elevation data.

To create expressions, you must use the factory methods in the ExpressionFactory module. The expression must be well-formed and resolve to a point value.

If you want to update the styling very often, consider using parameters in your expressions. Changing the values of parameters is more efficient than replacing the whole expression.

  // Example of a displacement expression that pushes down everything inside a shape.
  var _  = ExpressionFactory;
  var shape = _.orientedBox(layer.orientedBox);
  rasterStyle.displacementExpression =  _.pushDown(shape);
default

null terrain elevation is not displaced by default.

since

2020.1

Optional drapeTarget

drapeTarget: DrapeTarget

Determines where the raster is draped on.

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

Note that there is a technical limitation where you cannot drape the bottom-most imagery RasterLayer in the map.layerTree on 3D Tiles meshes. To work around this limitation, you can add a dummy raster layer underneath the layer you want to drape on meshes. That dummy layer then becomes the bottom-most raster layer. For more information, see Why isn't my data being draped on OGC 3D tiles?.

default

DrapeTarget.TERRAIN

see

GenericIconStyle.drapeTarget

see

ShapeStyle.drapeTarget

see

TileSet3DLayer.isDrapeTarget

since

2022.1

Optional fillStyle

fillStyle: FillStyle

The fill style used when the raster data extent is shown when zoomed out far.

When this property is undefined, a default red hatched area will be shown. This is to avoid that the raster on the map would be - unintentionally - invisible. Set this property to an empty object literal to turn off the fill.

This setting is only relevant for WebGL maps.

since

2023.0

Optional lineStyle

lineStyle: LineStyle

The line style used when the raster data extent is shown when zoomed out far.

When this property is undefined, a default red outline will be shown. This is to avoid that the raster on the map would be - unintentionally - invisible. Set this property to an empty object literal to turn off the outline.

This setting is only relevant for WebGL maps.

since

2023.0

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method