Class: Clip

ol.interaction. Clip


new Clip(options)

Clip interaction to clip layers in a circle

Parameters:
Name Type Description
options ol.interaction.Clip.options

flashlight param

    - radius {number} radius of the clip, default 100
    - layers {ol.layer|Array<ol.layer>} layers to clip

Extends

  • ol.interaction.Pointer

Methods


addLayer(layer)

Add a layer to clip

Parameters:
Name Type Description
layer ol.layer | Array.<ol.layer>

to clip


removeLayer(layer)

Remove a layer to clip

Parameters:
Name Type Description
layer ol.layer | Array.<ol.layer>

to clip


setActive(active)

Activate or deactivate the interaction.

Parameters:
Name Type Description
active boolean

Active.


setMap()

Set the map > start postcompose


setPosition(e)

Set position of the clip

Parameters:
Name Type Description
e ol.Pixel | ol.MapBrowserEvent

setRadius(radius)

Set clip radius

Parameters:
Name Type Description
radius integer