Closed hholzgra closed 7 years ago
<symbol>
and <use>
are not currently supported, see https://github.com/mapnik/mapnik/issues/763 and https://github.com/mapnik/mapnik/issues/3181
@hholzgra - Initial support for <use>
element added in https://github.com/mapnik/mapnik/tree/svg-strict-parsing (https://github.com/mapnik/mapnik/issues/763). As a side-effect <symbol>
elements are rendered too (at least in case of http://osm-baustelle.de/symbol-use.svg when <symbol>
is inside <def></def>
) but this still needs more work. Leaving this issue open to track <symbol>
support.
/cc @springmeyer
but this still needs more work. Leaving this issue open to track
support.
@artemp can you share what still needs work / is unsupported?
Also, should we track achieving full <symbol>
here or https://github.com/mapnik/mapnik/issues/3181?
<symbol>
needs implementing. The fact that it sometimes works already is just a byproduct of implementing <use>
.
Lets move this to mapnik/mapnik#3181 , closing. /cc @springmeyer
looks as ifs referenced by
Is this indeed an unsupported SVG feature, or am I simply doing it wrong?
As an example I rendered a GPX path with Waypoints, using a SVG that has a black square background and a smaller white square foreground.
The style for waypoings is as simple as possible:
With a "simple" SVG the result looks as expected:
http://osm-baustelle.de/simple.png
but when the white square is defined as a SVG and referenced
by a
http://osm-baustelle.de/symbol-use.png
The actual SVG files look exactly the same in the browser:
http://osm-baustelle.de/simple.svg http://osm-baustelle.de/symbol-use.svg
In this example it would be easy to just replace the
So post-processing the auto-generated SVG images would be a bit more complicated than just moving lines to a different part of the file.