From d95ea7972cf4c002e5443bb3163952abc9adb72f Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Fri, 8 Feb 2019 14:15:41 +0000 Subject: [PATCH] Set SVG version to 1.2 for SVG exports https://github.com/gravitystorm/openstreetmap-carto/issues/3653 https://github.com/mapnik/mapnik/pull/4029 --- cookbooks/tile/templates/default/export.erb | 1 + 1 file changed, 1 insertion(+) diff --git a/cookbooks/tile/templates/default/export.erb b/cookbooks/tile/templates/default/export.erb index 7d1b8c5bf..0cd115271 100644 --- a/cookbooks/tile/templates/default/export.erb +++ b/cookbooks/tile/templates/default/export.erb @@ -162,6 +162,7 @@ else: elif form.getvalue("format") == "svg": file = tempfile.NamedTemporaryFile(prefix = "export") surface = cairo.SVGSurface(file.name, map.width, map.height) + surface.restrict_to_version(cairo.SVG_VERSION_1_2) mapnik.render(map, surface) surface.finish() output_headers("image/svg+xml", "map.svg", file_size(file)) -- 2.39.5