[OSM-talk] Taglists support for rendering examples

Jochen Topf jochen at remote.org
Sun Nov 6 11:52:20 UTC 2016


Hi!

I have now added support to taginfo for showing an example rendering in
the taglists on the wiki.

If the "osmcarto-rendering" field in the KeyDescription or
ValueDescription info box template is set to an image link (typically
something like "Image:foo.svg" or "File:foo.svg"), this image will
show up in taglists if the taglists have the "with_rendering=true"
parameter. 

A detailed explanation is at:
https://wiki.openstreetmap.org/wiki/Taginfo/Taglists

Note that the "osmcarto-rendering-size" setting in the infobox is not used.
That setting is really not neccesary if the icons have been written in
the right way. If you look into the SVG of the icons you'll see the
difference:

The correct SVG looks something like this:
    <svg viewBox="0 0 14 14" width="14" height="14">

The incorrect SVG looks something like this:
    <svg viewBox="0 0 14 14" width="100%" height="100%">

So you have to explicitly set the right size. This is a common problem
with many icons and they should be fixed in the original repository at
https://github.com/gravitystorm/openstreetmap-carto and then re-imported
into the Wiki.

(And yes, it would make sense if we didn't have to copy the images into
the wiki, but there are more issues with that. I am trying to do the
next step here, not change everything in one go.)

With this change the taglists can be made to look exactly like the old,
manually created ones (for instance on the MapFeatures page).

Jochen
-- 
Jochen Topf  jochen at remote.org  https://www.jochentopf.com/  +49-351-31778688



More information about the talk mailing list