<div dir="ltr"><div>Hi,<br>A pure OpenLayers example can be shown here: <a href="http://mf-chsdi0i.bgdi.admin.ch/main/wsgi/GeoAdmin.ux/Swipe/examples/openlayers_swipe.html">http://mf-chsdi0i.bgdi.admin.ch/main/wsgi/GeoAdmin.ux/Swipe/examples/openlayers_swipe.html</a><br>

<br>The source code is here: <a href="http://docs.google.com/uc?export=download&id=0B_gmqEgDEiu5WGRGVDRQd281UVE">http://docs.google.com/uc?export=download&id=0B_gmqEgDEiu5WGRGVDRQd281UVE</a><br><br>Swipe can be used in the following way:<br>

<br><span style="font-family:courier new,monospace">var map = new OpenLayers.Map("map");<br><br>var ol_wms = new OpenLayers.Layer.WMS(<br>    "OpenLayers WMS",<br>    "<a href="http://vmap0.tiles.osgeo.org/wms/vmap0">http://vmap0.tiles.osgeo.org/wms/vmap0</a>",<br>

    {layers: "basic"}<br>);<br><br>var dm_wms = new OpenLayers.Layer.WMS(<br>    "Canadian Data",<br>    "<a href="http://www2.dmsolutions.ca/cgi-bin/mswms_gmap">http://www2.dmsolutions.ca/cgi-bin/mswms_gmap</a>",<br>

    {<br>        layers: "bathymetry,land_fn,park,drain_fn,drainage," +<br>                "prov_bound,fedlimit,rail,road,popplace",<br>        transparent: "true",<br>        format: "image/png"<br>

    },<br>    {isBaseLayer: false, visibility: true}<br>);<br><br>map.addLayers([ol_wms, dm_wms]);<br>var swipe = new OpenLayers.Control.Swipe({map: map});<br>map.addControls([new OpenLayers.Control.LayerSwitcher(),swipe]);<br>

swipe.activate();<br>map.zoomToMaxExtent();<br></span><br>Swipe control works also on mobile. <br><br></div>Hope this helps,<br>Cédric<br><div><br><br><br><br><br></div></div>