watergis/mapbox-gl-export

Export to SVG doesn't create a vector file.

mtdmali opened this issue · 2 comments

Describe the bug
This tool allows you to export a map as an SVG, but it doesn't create a vector file. Instead, it just embeds an <image> element with base64 encoded raster data.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the demo site.
  2. Click on the Print button.
  3. Export a map as an SVG.
  4. Open the exported SVG with a text editor.

Expected behavior
I would have expected the SVG to be a vector graphic. The exported SVG is basically useless if it's just a raster image wrapped with an SVG tag.

Screenshots
Screen Shot 2022-04-22 at 11 00 49 AM

In hindsight, I realize that what I have described may not even be a bug, and my comments specifically are not good examples of open source collaboration.

@mtdmali Yes, I know the issue. To be honest, creating vector format of SVG from mapbox style is too complicated, I gave up developing this and shifted to raster format of SVG instead. However, feel free to fork the repo and make a pull request for the issue. Thanks