A Leaflet plugin that allows users to download an image with a scaled-up version of the visible map.
- Compatible with Leaflet v2+.
- Ability to export a larger area of the map without zooming in.
- Basic layers (markers, circles, polygons) are included in the exported image.
- Supports tile layers: OSM, MapBox, etc.
14.12.2021
- Added support for multilayer export.
14.09.2025
- Added support for Leaflet 2.0.
NPM
npm install --save leaflet.bigimage
CDN / Local (Leaflet 1.x)
<link rel="stylesheet" href="dist/Leaflet.BigImage.min.css">
<script src="dist/Leaflet.BigImage.min.js"></script>
Leaflet 2.x (ES Modules)
import { Map, TileLayer, Marker, Circle, Polygon } from 'leaflet';
import { BigImageControl } from 'leaflet.bigimage';
mymap.addControl(new BigImageControl({ position: 'topright' }));
Options
You can pass a number of options to the plugin to control various settings.
Option | Type | Default | Description |
---|---|---|---|
position | String | 'topright' | Position of the print button |
title | String | 'Get image' | Tooltip text of the control button |
printControlLabel | String | ' |
Icon of the control button |
printControlClasses | Array | [] | CSS classes for the control button |
maxScale | Number | 10 | Maximum export image scale |
minScale | Number | 1 | Minimum export image scale |
inputTitle | String | 'Choose scale:' | Title above the scale input |
downloadTitle | String | 'Download' | Text on the download button |