]> git.openstreetmap.org Git - chef.git/commitdiff
Set SVG version to 1.2 for SVG exports
authorTom Hughes <tom@compton.nu>
Fri, 8 Feb 2019 14:15:41 +0000 (14:15 +0000)
committerTom Hughes <tom@compton.nu>
Fri, 8 Feb 2019 14:15:41 +0000 (14:15 +0000)
https://github.com/gravitystorm/openstreetmap-carto/issues/3653
https://github.com/mapnik/mapnik/pull/4029

cookbooks/tile/templates/default/export.erb

index 7d1b8c5bf61b0a39741c17464cd3548fa43f136d..0cd115271c5bcf313560dd6fff074b2e7f95be42 100644 (file)
@@ -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))