Class: Lego

ol.filter. Lego

Make a map or layer look like made of a set of Lego bricks.


new Lego( [options])

Parameters:
Name Type Argument Description
options Object <optional>
Properties
Name Type Argument Description
img string <optional>
brickSize number <optional>

size of te brick, default 30

crossOrigin null | string | undefined <optional>

crossOrigin attribute for loaded images.

Requires:
  • module:ol.filter

Extends

Requires

  • module:ol.filter

Members


img

Image definition

Methods


getActive()

Get filter active

Inherited From:
Overrides:
Returns:
Type
boolean

getPattern(offsetX, offsetY)

Get translated pattern

Parameters:
Name Type Description
offsetX number

x offset

offsetY number

y offset


postcompose()

Postcompose operation


set(key, val)

Overwrite to handle brickSize

Parameters:
Name Type Description
key string
val any

setActive(b)

Activate / deactivate filter

Parameters:
Name Type Description
b boolean
Inherited From:
Overrides:

setBrick(width, img, crossOrigin)

Set the current brick

Parameters:
Name Type Description
width number

the pattern width, default 30

img 'brick' | 'ol3' | 'lego' | undefined

the pattern, default ol3

crossOrigin string