Feature request #10060
Support SVG as WMS image format
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | Web Services clients/WMS | ||
Pull Request or Patch supplied: | No | Resolution: | |
Easy fix?: | No | Copied to github as #: | 18538 |
Description
QGIS seems to have nice SVG support in general, I can select SVG images in map composer for example, and I have set up WMS server which outputs SVG. This gives way better image quality for printouts. It is, well, really scalable. But I cannot select SVG as image format when adding WMS layer. I can select PNG but then the printed output looks almost unusable.
My current workaround is to use Wireshark to intercept WMS requests and then modify URL FORMAT parameter and invoke it in browser, as also web browsers can render SVG nicely.
Associated revisions
wms: add support for svg getmap requests (implements #10060)
wms client: handle + encoding (image/svg+xml) in format parameter also for
other requests (followup b118213d, refs #10060)
History
#1 Updated by Jürgen Fischer over 10 years ago
- Status changed from Open to Closed
Fixed in changeset b118213d7bf86465f782d6fdb39b3b50f4bc78b1.
#2 Updated by Jaak Laineste over 10 years ago
Thanks for superfast patch!
However, the + in FORMAT parameter still gets not escaped (even through the patch code tries to do it), so server gets "image/svg xml" as type and gives error response. You can test with my global OSM WMS at http://kaart.maakaart.ee/cgi-bin/wms (pick "default" layer).
#3 Updated by Jaak Laineste over 10 years ago
After some more usage it looks even more strange - after getting some invalid requests and errors in log, after re-adding layers it eventually started to make working URL queries, and got back SVG as expected. Maybe some capability caching issue?
However, I now got stuck with the next problem - print composer seems to rasterize automatically the map (if I print or save as pdf), or modify it too much (if save as SVG) to be usable. I still cannot get nice vector PDF output. But that's another issue.