Class: Swipe

ol.control. Swipe

OpenLayers 3 swipe Control.


new Swipe( [Control])

Parameters:
Name Type Argument Description
Control Object <optional>

opt_options.

- layers {ol.layer} layer to swipe
- rightLayer {ol.layer} layer to swipe on right side
- className {string} control class name
- position {number} position propertie of the swipe [0,1], default 0.5
- orientation {vertical|horizontal} orientation propertie, 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.