<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.19394"></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=640381422-10022013><FONT color=#0000ff 
size=2 face=Arial>Hi,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=640381422-10022013><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=640381422-10022013><FONT color=#0000ff 
size=2 face=Arial>cool control. </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=640381422-10022013><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=640381422-10022013><FONT color=#0000ff 
size=2 face=Arial>Works great with <FONT size=3><FONT color=#000000><FONT 
face="Times New Roman"><SPAN id=OLV class=olversion>Release 2.13 dev, but not 
with 2.12.</SPAN></FONT></FONT></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=640381422-10022013><FONT color=#0000ff 
size=2 face=Arial><FONT size=3><FONT color=#000000><FONT 
face="Times New Roman"><SPAN 
class=olversion></SPAN></FONT></FONT></FONT></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=640381422-10022013><FONT color=#0000ff 
size=2 face=Arial><SPAN class=olversion>Have you an idea, what can cause the 
error?</SPAN></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=640381422-10022013><FONT color=#0000ff 
size=2 face=Arial><SPAN class=olversion></SPAN></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=640381422-10022013><FONT color=#0000ff 
size=2 face=Arial><SPAN class=olversion>TypeError: 
this.map.layerContainerOriginPx is undefined<BR>var top = 
-this.map.layerContainerOriginPx.y;<BR>Swipe.js (Zeile 
402)<BR></SPAN></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=640381422-10022013><FONT color=#0000ff 
size=2 face=Arial><SPAN class=olversion>Arnd</DIV></SPAN></FONT></SPAN><BR>
<DIV dir=ltr lang=de class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>Von:</B> openlayers-users-bounces@lists.osgeo.org 
[mailto:openlayers-users-bounces@lists.osgeo.org] <B>Im Auftrag von </B>Cédric 
MOULLET<BR><B>Gesendet:</B> Sonntag, 10. Februar 2013 06:07<BR><B>An:</B> 
Sergeant_york<BR><B>Cc:</B> openlayers-users@lists.osgeo.org<BR><B>Betreff:</B> 
Re: [OpenLayers-Users] OpenLayers.Control.Swipe<BR></FONT><BR></DIV>
<DIV></DIV>
<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></BODY></HTML>