Geo::OSM::Render::Viewport - Project OSM latitudes and longitudes into x, y coordinate pairs to be rendered by Geo::OSM::Render.

SYNOPSIS

This is an abstract base class. So, I am hard pressed to write a synopsis here.

OVERVIEW

After projecting OSM coordinates onto a coordinate system with Geo::OSM::Render::Projection, the resulting coordinates migth be translated onto the coordinate system of the map. This can be done with an instance of viewport.

METHODS

new

    my $vp = Geo::OSM::Render::Viewport->new();

Create an instance of a viewport. Use it in a derived class.

x_y_to_map_x_y

    my ($map_x, $map_y) = $vp->x_y_to_map_x_y($x, $$y);

Because this is an abstract base class, calling this method on <Geo::OSM::Render::Viewport> just croaks.

AUTHOR

René Nyffenegger <rene.nyffenegger at 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.