Options
All
  • Public
  • Public/Protected
  • All
Menu

A FillStyle describes how an object should be filled. If the FillStyle doesn't have one of the following properties, it is considered as an empty fill.

since

2013.0

Hierarchy

  • FillStyle

Overview

Properties

Optional bloom

bloom: BloomStyle

Adds a BloomEffect to the fill.

Bloom is only supported on WebGL maps.

since

2022.1

Optional color

color: string

The fill color as a CSS color string. For example "rgb(125, 125, 125)" or "rgba(125, 125, 125, 0.5)".

When an url or image and the fill color are specified, the fill color will be used as fallback fill when the image cannot be loaded.

Optional credentials

credentials: boolean

Whether the image should be requested with authentication parameters. Setting this to true is required when the server requires cookies, basic http authentication. This flag should be set to false if the server is configured to allow cross-origin requests from all hosts. Such servers reject all authenticated requests.

This parameter is only relevant when you are using the `FillStyle#url` property to request images. If you use the image using the `FillStyle#image` property, the credentials are automatically handled by the browser.

By default false is used if not set

Optional height

height: string | number

The target height of the image, with a given unit of measure.

This can be either percentage, pixels or a length unit. For example: "16px", "50%" or "25.2m". Valid length units are symbols of uoms registered in LuciadRIA. The default is "100%", which implies that the image is painted at its original resolution.

If this is a number, the height is interpreted in the units defined by uom. If no uom is set, the height is interpreted in pixels.

You cannot mix world lengths and pixels for height and width. If height is expressed in a length unit, width must be as well (and vice-versa).

Optional image

image: HTMLImageElement | HTMLCanvasElement

An Image or Canvas DOM element which will be used as fill. For example the HatchedImageBuilder class can be used to create such an image. This property cannot be combined with the url property.

When an url or image and the fill color are specified, the fill color will be used as fallback fill when the image cannot be loaded.

Optional opacity

opacity: number

The opacity of the image, determines how transparent an image will be painted. It's a numeric value between 0 and 1. 0 indicates that the image will be painted completely transparent and 1 indicates that the original image of the icon will be used.

This parameter is only relevant when you are using an image through either the `FillStyle#url` or the `FillStyle#image` properties. If you are use using the `FillStyle#color` property, the opacity from the specified color will be used instead.

By default 1 is used if not set.

Optional rotation

rotation: number

The rotation of the image, specified in degrees. The default is 0, which implies no rotation. Rotations are applied in a clock-wise fashion. Rotation of the image happens around its center point.

This parameter is only relevant when you are using an image through either the `FillStyle#url` or the `FillStyle#image` properties.

By default 0 is used if not set.

Optional uom

Determines the interpretation of units for width and height . When set to a length unit of measure (meters, feet,...), image fills will grow and shrink as you zoom the map in and out.

For georeferenced maps, supported UnitOfMeasures are:

  • getUnitOfMeasure("Pixels")
  • UnitOfMeasure of type getQuantityKind("Length"), for example getUnitOfMeasure("Meter")

The unit of measure applies to width and height. The uom determines the interpretation of the values as pixels or as a length unit that represents the actual size of real-world objects, like for example meter or foot.

The uom property is only supported on geographically referenced maps. Maps configured with a cartesian reference do not support FillStyles with a uom set.

The property is optional and the default value is the Pixel unit.

since

2023.0

Optional url

url: string

A URL referring to an image resource which will be used as fill. For example "resources/img/hatch.png". This property cannot be combined with the image property.

When an url or image and the fill color are specified, the fill color will be used as fallback fill when the image cannot be loaded.

Optional width

width: string | number

The target width of the image, with a given unit of measure.

This can be either percentage, pixels or a length unit. For example: "16px", "50%" or "25.2m". Valid length units are symbols of uoms registered in LuciadRIA. The default is "100%", which implies that the image is painted at its original resolution.

If this is a number, the width is interpreted in the units defined by uom. If no uom is set, the height is interpreted in pixels.

You cannot mix world lengths and pixels for width and height. If width is expressed in a length unit, height must be as well (and vice-versa).

By default "100%" is used if not set

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