0% found this document useful (0 votes)
20 views3 pages

GitHub - Hersle - Leaflet-Route-Print - A Leaflet Plugin For Easy Client-Side Printing of Routes

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views3 pages

GitHub - Hersle - Leaflet-Route-Print - A Leaflet Plugin For Easy Client-Side Printing of Routes

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

23/07/2024, 15:40 GitHub - hersle/leaflet-route-print: A Leaflet plugin for easy client-side printing of routes

hersle / leaflet-route-print Public

A Leaflet plugin for easy client-side printing of routes

hersle.github.io/leaflet-route-print/

MIT license

7 stars 1 fork Branches Tags Activity

Star Notifications

Code Issues 1 Pull requests Actions Projects Security Insights

mas… 2 Branches 0 Tags Go to file Go to file Code

hersle Use new Kartverket tile sources 20fd9c0 · last week

jsPDF Added missing jsPDF source map 3 years ago

leaflet-image Added licenses 3 years ago

leaflet Added licenses 3 years ago

LICENSE.txt Added licenses 3 years ago

README.md Added screenshot last year

demo.sh Modularize with imports/exports 3 years ago

index.css Made miscellaneous settings closable… 3 years ago

index.html Link from demo back to GitHub 3 years ago

index.js Use new Kartverket tile sources last week

leaflet-route-print.js Fixed wrong aspect ratio in mixed ori… 2 years ago

ribbon.css Link from demo back to GitHub 3 years ago

screenshot.png Added screenshot last year

util.js Modularize with imports/exports 3 years ago

README MIT license

Leaflet-route-print

https://github.com/hersle/leaflet-route-print 1/3
23/07/2024, 15:40 GitHub - hersle/leaflet-route-print: A Leaflet plugin for easy client-side printing of routes

leaflet-route-print is a Leaflet-plugin to print routes. It features an algorithm that finds a sequence of rectangles of
a given size that fully cover the route and automatically prints them to a PDF file.

Demonstration
Visit hersle.github.io/leaflet-route-print or clone and run

./demo.sh

Usage and documentation

import * as L from "./leaflet.js";


import "./leaflet-route-print.js";

// Initialize and configure map


var map = L.map("map");
...

// Create route printing control and add it to the map


var routePrinter = new L.Control.PrintRouteControl();
routePrinter.addTo(map);

// Set the Leaflet Polyline to print


// IMPORTANT: elements to be included in the print must be rendered with Leaflet's Canvas renderer!
var line = L.polyline(..., {renderer: L.canvas()});
routePrinter.setRoute(line);

https://github.com/hersle/leaflet-route-print 2/3
23/07/2024, 15:40 GitHub - hersle/leaflet-route-print: A Leaflet plugin for easy client-side printing of routes

Releases

No releases published

Languages

JavaScript 96.9% CSS 3.0% Other 0.1%

https://github.com/hersle/leaflet-route-print 3/3

You might also like