Search code examples
javascriptopenlayers

Show partly one layer and partly another layer in OpenLayers?


I need to show let's say on half page the topmost layer, and on the other half the layer below. Being able to change how much is visible of each layer would be great if easily possible (by dragging the border between them for example).

Right now I have no other idea besides implementing something clunky with frames and two separate maps. Any better ideas?


Solution

  • Watch this control written by Cédric Moullet presented in DEV list in this post: http://osgeo-org.1560.x6.nabble.com/OpenLayers-Control-Swipe-td5032741.html