[OSM-dev] Re: [OSM-talk] SVG from OpenStreetMap

Etienne Cherdlu openstreetmap-L at gj0.net
Fri Mar 17 14:15:24 GMT 2006


On 3/17/06, Tom Carden <tom at tom-carden.co.uk> wrote:
>
> For those who don't follow the OpenStreetMap wiki too closely, I just
> wrote a post to the new OpenGeoData blog highlighting Etienne's
> interesting experiments with XSL transforms for generating SVG from
> the OSM API's XML. (Excuse my TLAs).


The current recipe for anyone who wants to try rendering their own bit of
the world is here:
http://wiki.openstreetmap.org/index.php/Talk:KT13_Weybridge#Rendering_tool


* SVG has built in support for rendering text along paths, making
> drawing road names etc that bit easier


Alas, this is one bit of SVG that is not yet implemented in Firefox (but
Adobe's SVG plug-in does).

There's no reason I can think of not to put an XSL style sheet
> directly into the OSM API output, and link to it from the map viewer
> for the current bounding box.


It would be nice to have an API call that would serve up the XML with the
appropriate processing instruction and also have the stylesheet provided
from the server.  It would need the bounding box attributes to be part of
the XML output, but you've already realised that.

The only thing I'm not sure about is
> how easy it is to save the resulting SVG (I had to use the 'copy XML'
> option from the DOM inspection tool) and if it's ever going to work in
> other browsers.


One option would be to transform the xml using xalan on the server and just
deliver the resulting svg.  This is probably the only way to make it work
for IE (there are just too many ways IE can be "configured" so that the
xml->xsl->svg stuff doesn't work).   Unfortunately this would put more load
on the server :(

Etienne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20060317/dfddc392/attachment.html>


More information about the dev mailing list