1.0.7 • Published 12 months ago

react-leaflet-map-screenshot v1.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

react-leaflet-map-screenshot

React Leaflet hook which takes a screenshot of a Leaflet map. Uses html-to-image.

This is influenced by leaflet-simple-map-screenshoter, in fact it takes a couple of things directly from it - waiting for interactions to finish and an array of elements to hide before taking a screenshot.

I had some issues with that addon, although I think it was mainly with dom-to-image which it used. I have created this to simplify further the process of capturing a leaflet map as a screenshot, but also using more recent libraries.

Install

npm install react-leaflet-map-screenshot --save

Usage

import useMapScreenshot from 'react-leaflet-map-screenshot'

const screenshoter = useMapScreenshot()
const screenshot = await screenshoter.takeScreenshot('png')
1.0.7

12 months ago

1.0.5

12 months ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago