Skip to content

pasichnykvasyl/Leaflet.BigImage

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
August 10, 2020 12:23
src
December 14, 2021 15:24
July 20, 2020 12:44
June 10, 2022 10:00
October 15, 2020 16:24
July 22, 2020 16:53

BigImage

General information

A leaflet plugin that allows users to download an image with a scaled-up version of the visible map.

  • Opportunities:
    • Compatible with Leaflet v1+.
    • The ability to increase the area of the map without increasing.
    • Simple layers will show on image.
    • Tiles ssupport: OSM, MapBox, etc.

Changelog

14.12.2021

  • Add support multilayer export

Demo

Leaflet.BigImage

Downloads

NPM

	npm install --save leaflet.bigimage

Usage

Step 1. Include the required js and css files in your document.

  <link rel="stylesheet" href="dist/Leaflet.BigImage.min.css">
  <script src="dist/Leaflet.BigImage.min.js"></script>

Step 2. Add the following line of code to your map script

	L.control.bigImage({position: 'topright'}).addTo(mymap);

Step 3. You can pass a number of options to the plugin to control various settings.

Option Type Default Description
position String 'topright' Position the print button
title String 'Get image' Sets the text which appears as the tooltip of the control button
printControlLabel String '🖶' Sets icon to the control button
printControlClasses Array [] Sets classes to the control button
maxScale Int 10 Max image scale
minScale Int 1 Min image scale
inputTitle String 'Choose scale:' Title before scale input
downloadTitle String 'Download' Text on the download button