Class: Lego

ol.filter. Lego


new Lego(options)

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

Parameters:
Name Type Description
options *
Properties
Name Type Description
brickSize Number

size of te brick, default 30

crossOrigin null | string | undefined

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:
Returns:
Type
bool

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

setActive(b)

Activate / deactivate filter

Parameters:
Name Type Description
b bool
Inherited From:

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