Class: CSS

ol.filter. CSS

Add a mix-blend-mode CSS filter (not working with IE or ol<6). Add a className to the layer to apply the filter to a specific layer.
With ol<6 use ol.filter.Composite instead.
Use ol.layer.Base#addFilter, ol.layer.Base#removeFilter or ol.layer.Base#getFilters


new CSS(options)

Parameters:
Name Type Description
options Object
Properties
Name Type Description
blend string

mix-blend-mode to apply (as CSS property)

filter string

filter to apply (as CSS property)

display boolan

show/hide layer from CSS (but keep it in layer list)

Extends

  • ol.Object

Methods


addToLayer(layer)

Add CSS filter to the layer

Parameters:
Name Type Description
layer ol.layer.Base

removeFromLayer(layer)

Remove CSS filter from the layer

Parameters:
Name Type Description
layer ol.layer.Base

setBlend(blend)

Modify blend mode

Parameters:
Name Type Description
blend string

mix-blend-mode to apply (as CSS property)


setDisplay(display)

Modify layer visibility (but keep it in the layer list)

Parameters:
Name Type Description
display bolean

setFilter(filter)

Modify filter mode

Parameters:
Name Type Description
filter string

filter to apply (as CSS property)