How are SVGs rendered when exported?

I’ve read here http://forum.openstreetmap.org/viewtopic.php?id=9590 that Mapnik and Osmarender can produce SVGs. Looking into the Wiki showed http://wiki.openstreetmap.org/wiki/Svg . How are they rendered? Which language? Where do I find the sources?

Wyo

Mapnik uses Cairo or AGG for rendering (I guess one can choose) [1]. Both are able to handle the same functions with another output (PNG, SVG, PDF, …)
Osmarender uses XSLT. Therefore the OSM-XML is directly transoformed into an SVG (which ist XML as well). After that Tiles@Home (which produces the osmarender-layer) uses Inkscape [2] for rendering PNG-tiles out of the SVGs.


[1] http://trac.mapnik.org/wiki/MapnikRenderers
[2] http://www.inkscape.org

Hope this helps,
Malte

Thanks. Therefore not much help for the Html Editor.

Wyo

Probably OpenLayers can help here:
As far as I know a Vector Layer in OpenLayers is embedded SVG as well. It can get its data directly from osm-files, geojson, and a couple of other formats and has options for styling, mouse events and so on.

EDIT: Look at this example: http://openlayers.org/dev/examples/osm-layer.html
it retrieves its data from a (in this case cached) osm-file, and on click it also displays the tags of the element. As the tags are saved in variables it shouldn’t be any problem to fill text-input-fields with it.

Malte

as far as I know, Merkaartor and maposmatic.org also do some rendereing with SVG output … any hints in their documentation or source code?