Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Leafmap

QGIS Plugin GitHub

A QGIS plugin for interactive layer visualization and comparison, inspired by the leafmap Python package.

Features

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

  1. Open QGIS.

  2. Go to Plugins > Manage and Install Plugins....

  3. Go to the Settings tab.

  4. Click Add... under “Plugin Repositories”.

  5. Give a name for the repository, e.g. “OpenGeos”.

  6. Enter the URL of the repository: https://qgis.gishub.org/plugins.xml.

  7. Click OK.

  8. Go to the All tab.

  9. Search for “Leafmap”.

  10. 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 --remove

Using Bash:

chmod +x install.sh
./install.sh
# Or remove
./install.sh --remove

Option C: Manual Installation

Copy the qgis_leafmap folder to your QGIS plugins directory:

Usage

Layer Transparency

  1. Click the Layer Transparency button in the toolbar or go to Leafmap > Layer Transparency.

  2. A dockable panel appears with a slider for each layer.

  3. Drag the slider to adjust transparency (0% = opaque, 100% = transparent).

  4. Use the filter options to show only raster or vector layers.

  5. Use “Reset All” to restore all layers to 0% transparency.

Layer Swipe Tool

  1. Click the Layer Swipe button in the toolbar or go to Leafmap > Layer Swipe.

  2. Select the Left Layer (shown on the left side of the divider).

  3. Select the Right Layer (shown on the right side of the divider).

  4. Choose Vertical or Horizontal orientation.

  5. Click Activate Swipe.

  6. Drag the divider on the map to compare layers.

  7. Use the slider or quick buttons to adjust the divider position.

  8. Click Deactivate Swipe when done.

Settings

  1. Go to Leafmap > Settings.

  2. Adjust general, transparency, and swipe-tool options.

  3. Click Save Settings to persist changes.

Check for Updates

  1. Go to Leafmap > Check for Updates....

  2. Click Check for Updates to see if a new version is available.

  3. If an update is available, click Download and Install Update.

  4. Restart QGIS to apply the update.