---
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.
tags: "export, png, openstreetmap"
resources:
  - https://cdnjs.cloudflare.com/ajax/libs/FileSaver.js/1.3.3/FileSaver.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>

---
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 requires a browser
  that supports <a href="https://developer.mozilla.org/de/docs/Web/API/HTMLCanvasElement/toBlob#Browser_compatibility">
  <code>canvas.toBlob()</code></a>.
tags: "export, png, openstreetmap"
resources:
  - https://cdnjs.cloudflare.com/ajax/libs/FileSaver.js/1.3.3/FileSaver.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>

Add note that canvas.toBlob() is required
Add note that canvas.toBlob() is required
