You are not logged in.
- Topics: Active | Unanswered
Announcement
Please create new topics on the new site at community.openstreetmap.org. We expect the migration of data will take a few weeks, you can follow its progress here.***
Pages: 1
#1 2010-10-12 18:43:17
- wyo
- Member

- From: Thalwil
- Registered: 2010-08-04
- Posts: 667
- Website
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
Offline
#2 2010-10-12 21:02:00
- E-Malte
- Member
- From: Düsseldorf
- Registered: 2009-03-06
- Posts: 324
Re: How are SVGs rendered when exported?
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
Offline
#3 2010-10-12 21:21:27
- wyo
- Member

- From: Thalwil
- Registered: 2010-08-04
- Posts: 667
- Website
Re: How are SVGs rendered when exported?
Offline
#4 2010-10-12 22:14:36
- E-Malte
- Member
- From: Düsseldorf
- Registered: 2009-03-06
- Posts: 324
Re: How are SVGs rendered when exported?
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
Last edited by E-Malte (2010-10-12 22:18:44)
Offline
#5 2010-10-13 16:15:07
- stephan75
- Member
- Registered: 2008-05-28
- Posts: 2,918
Re: How are SVGs rendered when exported?
as far as I know, Merkaartor and maposmatic.org also do some rendereing with SVG output ... any hints in their documentation or source code?
Offline
Pages: 1