New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

leaflet-easyprint

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

leaflet-easyprint

A leaflet plugin which adds an icon to print the map

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
541
decreased by-80.84%
Maintainers
1
Weekly downloads
 
Created
Source

leaflet-easyPrint

A simple leaflet plugin which adds an icon to print the map. Compatible with both Leaflet v1+ and 0.7.

Check out the demo.

Usage

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

   	<script src="dist/leaflet.easyPrint.js"></script>   	

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

L.easyPrint().addTo(map)

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

OptionTypeDefaultDescription
titlestring'Print map'Sets the text which appears as the tooltip of the print button
positionLeaflet control position'topleft'Position the print button
elementsToHidestringnoneEnables you to pass through a string of html elements to hide when the user prints the page

Here's an example of passing through some options.

L.easyPrint({
	title: 'My awesome print button',
	position: 'bottomright',
	elementsToHide: 'p, h2'
}).addTo(map);

Acknowledgements

Huge hats off go to mourner and all the contributors to the leaflet.js project, it's an amazing piece of open source software!

And finally thanks to IcoMoon for the print icon.

Keywords

FAQs

Package last updated on 01 Feb 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc