QuickMapCompare
A grid of side-by-side viewports in one dockable panel, live-synced to the QGIS canvas.
- Downloads
- 6,063
- Requires
- QGIS 3.16+
- Stack
- Python · PyQt5/6 · QgsMapCanvas
- License
- GPL v2+
What it does
Click "Add Viewport" and pick what the tile shows. Tiles arrange into a roughly square grid that reflows as you add or remove them, and the dividers can be dragged to resize. Each tile can follow the main canvas or stay frozen.
Three kinds of viewport
- QGIS layer: any layer in the project, rendered natively by
QgsMapCanvas. - WMS/XYZ tiles: built-in basemaps with no API key, rendered natively: OpenStreetMap, CyclOSM, Esri hillshade, topographic, ocean, NatGeo and light gray, USGS Topo, CartoDB, Google Maps and Bing aerial.
- Web map providers: Google Maps, Wikimedia Maps, OpenRailwayMap and OpenSnowMap in an embedded webview.
Swipe compare
Arm a layer or tile viewport, hold S over the main canvas and move the mouse: one side of the cursor shows the armed viewport, composited straight onto the canvas. An event filter on the canvas handles the key and mouse, and a transparent child widget paints a snapshot from a same-extent mirror canvas. The mirror waits for its render job to finish before the snapshot, because QGIS renders asynchronously and grabbing too early catches a blank frame.
Design decisions
Native tile viewports sync pixel-perfectly with setExtent(); webview tiles sync after a 400 ms debounce, since each update reloads a page. OpenStreetMap and CyclOSM are offered as native tiles because their websites show pop-ups on every reload. Bing is native-only, because several embedded GPU-heavy webviews at once can crash QGIS. The code uses scoped Qt enums so it runs on both PyQt5 and PyQt6.