jmmluna / ol-map-screenshot

A simple and easy-to-use library to provide the OpenLayers map screenshot.
MIT License
13 stars 3 forks source link

Impossible to assign png format to snapshots #9

Closed nvasta closed 3 years ago

nvasta commented 3 years ago

The 'png' format parameter doesn't seem to work.

After having a quick look at the MapExporter.js code I found the following:

if (param.format) format = param.format.toLowerCase() === 'PNG' ? 'image/png' : format;

This doesn't make much sense does it?

jmmluna commented 3 years ago

Hi Nikolaos,

you are absolutely right about the PNG format issue. I'll fix it and run the tests, and let you know once the fix is available.

Thank you very much for your contribution.

Best regards

jmmluna commented 3 years ago

Version 1.0.2 is now available!!

nvasta commented 3 years ago

Awesome!, Thanks for the quick fix!