Class: Swipe

ol.control. Swipe

Swipe Control.


new Swipe( [Control])

Parameters:
Name Type Argument Description
Control Object <optional>

options.

options.layers ol.layer

layer to swipe

options.rightLayer ol.layer

layer to swipe on right side

options.className string

control class name

options.position number

position propertie of the swipe [0,1], default 0.5

options.orientation string

orientation propertie (vertical|horizontal), default vertical

Extends

Methods


addLayer(layer, add)

Add a layer to clip

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

to clip

add bool

layer in the right part of the map, default left.


removeLayer(layer)

Remove a layer to clip

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

to clip


setMap(map)

Set the map instance the control associated with.

Parameters:
Name Type Description
map _ol_Map_

The map instance.