Use html-to-image instead of dom-to-image-more

dom-to-image-more do not support safari
This commit is contained in:
Frederic Junod
2019-04-23 09:58:29 +02:00
parent d5b868f4a6
commit 2ac1095c52
6 changed files with 8 additions and 7 deletions

View File

@@ -3,11 +3,9 @@ layout: example.html
title: Map Export
shortdesc: Example of exporting a map as a PNG image.
docs: >
Example of exporting a map as a PNG image. This example use the <a href="https://www.npmjs.com/package/dom-to-image-more">dom-to-image-more</a>
Example of exporting a map as a PNG image. This example use the <a href="https://www.npmjs.com/package/html-to-image">html-to-image</a>
library.
tags: "export, png, openstreetmap"
resources:
- https://unpkg.com/dom-to-image-more@2.7.1/dist/dom-to-image-more.min.js
---
<div id="map" class="map"></div>
<a id="export-png" class="btn btn-default"><i class="fa fa-download"></i> Download PNG</a>