Geo::OSM::Render::Renderer::SVG - Specialization of base class Geo::OSM::Render for rendering SVG.

SYNOPSIS

OVERVIEW

METHODS

new

my $proj = Geo::OSM::Render::Projection::CH_LV03->new();
my $vp   = Geo::OSM::Render::Viewport::Clipped->new(…);

my $osm_renderer_svg = Geo::OSM::Render::Renderer->new(
  $svg_filename,
  $proj,
  $vp
);

…

$osm_renderer_svg->end();

end

When finished rendering, this method writes the SVG.

render_node

$osm_renderer_svg -> render_node(
  $node,
  r => $radius,
  styles=> { … }
); 

Renders a node.

See also "render_node" in Geo::OSM::Render::Renderer.

render_way

$osm_renderer_svg -> render_way(
  styles=> { … }
); 

Renders a way.

See also "render_way" in Geo::OSM::Render::Renderer.

line

$osm_renderer_svg -> line(
  $lat_start, $lon_start,
  $lat_end  , $lon_end,
  styles=> { … }
); 

Draws a line on the SVG map.

See also "render_way" in Geo::OSM::Render::Renderer.

AUTHOR

René Nyffenegger <rene.nyffenegger@adp-gmbh.ch>

COPYRIGHT AND LICENSE Copyright © 2017 René Nyffenegger, Switzerland. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the terms of the the Artistic License (2.0). You may obtain a copy of the full license at: http://www.perlfoundation.org/artistic_license_2_0

Source Code

The source code is on github. Meaningful pull requests are welcome.