Class: StrokePattern

ol.style. StrokePattern

Stroke style with named pattern


new StrokePattern(options)

Parameters:
Name Type Description
options any
Properties
Name Type Description
image ol.style.Image | undefined

an image pattern, image must be preloaded to draw on first call

opacity number | undefined

opacity with image pattern, default:1

pattern olx.style.fillPattern

pattern name (override by image option)

color ol.colorLike

pattern color

fill ol.style.Fill

fill color (background)

offset number

pattern offset for hash/dot/circle/cross pattern

size number

line size for hash/dot/circle/cross pattern

spacing number

spacing for hash/dot/circle/cross pattern

angle number | bool

angle for hash pattern / true for 45deg dot/circle/cross

scale number

pattern scale

Implements:
  • ol.structs.IHasChecksum

Extends

  • ol.style.Fill

Methods


clone()

Clones the style.

Returns:
Type
ol.style.StrokePattern

getImage()

Get canvas used as pattern

Returns:
Type
canvas

getPattern_(options)

Get pattern

Parameters:
Name Type Description
options olx.style.FillPatternOption