A QGIS plugin for interactive layer visualization and comparison, inspired by the leafmap Python package.
Repository: https://
github .com /opengeos /qgis -leafmap -plugin License: MIT
Requires: QGIS 3.28+, Python 3.10+
Features¶
Layer Transparency Control: Interactive slider to adjust layer transparency in real time for all loaded layers.
Layer Swipe Tool: Compare two layers side-by-side with a draggable divider (similar to ipyleaflet’s split control).
Dockable Panels: All tools are available as dockable panels that can be positioned anywhere in the QGIS interface.
Plugin Update Checker: Check for updates from GitHub and install them automatically.
Settings Panel: Configure plugin options with persistent storage.
Layer Transparency Panel¶
Control the transparency of all layers with individual sliders. Filter by layer type (raster/vector) and visibility.
Layer Swipe Tool¶
Compare two layers by swiping between them. Select left and right layers, choose vertical or horizontal orientation, and drag the divider on the map.
Video Tutorial¶
Compare Layers Visually in QGIS: New Leafmap Plugin Demo!
Installation¶
Option A: QGIS Plugin Manager (Recommended)¶
Open QGIS.
Go to Plugins > Manage and Install Plugins....
Go to the Settings tab.
Click Add... under “Plugin Repositories”.
Give a name for the repository, e.g. “OpenGeos”.
Enter the URL of the repository: https://
qgis .gishub .org /plugins .xml. Click OK.
Go to the All tab.
Search for “Leafmap”.
Select the plugin and click Install Plugin.
Option B: Install Script¶
Using Python:
git clone https://github.com/opengeos/qgis-leafmap-plugin.git
cd qgis-leafmap-plugin
python install.py
# Or remove
python install.py --removeUsing Bash:
chmod +x install.sh
./install.sh
# Or remove
./install.sh --removeOption C: Manual Installation¶
Copy the qgis_leafmap folder to your QGIS plugins directory:
Linux:
~/.local/share/QGIS/QGIS3/profiles/default/python/plugins/macOS:
~/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/Windows:
%APPDATA%\QGIS\QGIS3\profiles\default\python\plugins\
Usage¶
Layer Transparency¶
Click the Layer Transparency button in the toolbar or go to Leafmap > Layer Transparency.
A dockable panel appears with a slider for each layer.
Drag the slider to adjust transparency (0% = opaque, 100% = transparent).
Use the filter options to show only raster or vector layers.
Use “Reset All” to restore all layers to 0% transparency.
Layer Swipe Tool¶
Click the Layer Swipe button in the toolbar or go to Leafmap > Layer Swipe.
Select the Left Layer (shown on the left side of the divider).
Select the Right Layer (shown on the right side of the divider).
Choose Vertical or Horizontal orientation.
Click Activate Swipe.
Drag the divider on the map to compare layers.
Use the slider or quick buttons to adjust the divider position.
Click Deactivate Swipe when done.
Settings¶
Go to Leafmap > Settings.
Adjust general, transparency, and swipe-tool options.
Click Save Settings to persist changes.
Check for Updates¶
Go to Leafmap > Check for Updates....
Click Check for Updates to see if a new version is available.
If an update is available, click Download and Install Update.
Restart QGIS to apply the update.
Related Projects¶
leafmap: A Python package for interactive mapping and geospatial analysis.
ipyleaflet: A Jupyter widget for Leaflet.js interactive maps.
geemap: A Python package for interactive mapping with Google Earth Engine.
