Hot answers tagged


What you want to do, is usually called a 'Swipe' tool. There is no inbuilt tool or control for this in OpenLayers, but thankfully, there is an example here: Swipe Control with Google and OSM based on a custom class. You just need to include this JavaScript file in your application. Most Swipe Tools/controls that I have seen online, are based on the ...


MapSwipe Tool perhaps? Its description: This plugin is a map tool for swipe active layer, for example, you can see the difference with others layers below.


Mango does it with Leaflet. Check out an example here. Of course you could just save the time to code it yourself and just create the map for free using Mango.


They are just standard icons in QGIS' message bar. The first is a countdown timer, showing disappearing ticks until the message automatically disappears. The second indicates the severity of the message. In this case, it's just an information message. If it was a warning or critical error the icon would be different.


I could find two such samples. There is a sample from ESRI which uses ArcGIS Online. swipe-map-storytelling-template-js There is an sample on ArcScripts here by Sathya Prasad


This is a working Leaflet example using two WMS layers and leaflet 0.5. It does need a bit of tweaking, for example the layers aren't clipped while panning. But it works pretty well. See here:


In OpenLayers Swipe Control is easy enough to use, the following code should set you up: var map; var swipe; function init() { map = new OpenLayers.Map({ div : "map", allOverlays : true }); var osm = new OpenLayers.Layer.OSM(); var gmap = new OpenLayers.Layer.Google("Google Streets"); map.addLayers([ osm, gmap ]); ...


Have a look at WMS Split for Leaflet.


I find solution, code below (or live example <script> var BingLayer = L.TileLayer.extend({ getTileUrl: function(tilePoint) { this._adjustTilePoint(tilePoint); return L.Util.template(this._url, { s: this._getSubdomain(tilePoint), q: ...


There are many JQuery Plugins as well as custom Javascript which can do this. A quick Google search gives me (I haven't personally used any of them, so take this list with a pinch of salt) : jQuery Before and After Image Comparison Plugin - Image Reveal A “Before And After” Image Comparison Slide Control in HTML5 The code is relatively straightforward, and ...


You should probably look into OpenLayers 3. You can look at the code of examples by using CTRL + U: The code does not look too complex either:


it is possible with leaflet. here what I done the swipe map with leaflet and jquery. $(document).ready(function() { var currentX = $("#viewport").width() / 2; var resetPosition = function(x){ var pos = $(".leaflet-map-pane").position(), coordLeft = ( - ) + "px, " + ( x - pos.left + 3 ) + "px, " + ( $("#...

Only top voted, non community-wiki answers of a minimum length are eligible