SVG share only creates a bitmap image in a SVG file

Hello,

I looked for a way to generate a SVG file. Whether it was the official wiki, answers in forums, tutorials or videos, all sources told me to use Share → SVG.

When I do that, a SVG file is downloaded correctly, but its content is the following:


<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="633pt" height="423pt" viewBox="0 0 633 423" version="1.1">
<defs>
<image id="image38" width="2638" height="1763" xlink:href="data:image/png;base64,SomeBase64DataHereButLikeARealLotOfItWhichLosesThePointOfGettingASvgFile"/>
</defs>
<g id="surface1">
<use xlink:href="#image38" transform="matrix(0.24,0,0,0.24,0,0)"/>
</g>
</svg>

Soooo… my SVG is a .svg file that contains a PNG image of the area I want to use. Let’s just say that it is as clever as sending your photo album as a Word document (this is not a compliment).

Do I do things wrong? Is there a problem with the export? Please tell me what to do if I want to use the objects from OSM and not just a picture.

Best regards

This appears to be a known but unresolved issue:

https://help.openstreetmap.org/questions/65497/is-there-any-change-in-svg-exports

https://github.com/mapnik/mapnik/issues/3749

OK, thanks Richard.

I’ll wait until they fix the bug, then :confused:

This bug seems to be fixed now. It looks like a Mapnik problem, but there’s also a workaround deployed in the export code on the OSM.org website which works immediately. See more details here:

https://github.com/gravitystorm/openstreetmap-carto/issues/3653