| Algorithm-GooglePolylineEncoding documentation | view source | Contained in the Algorithm-GooglePolylineEncoding distribution. |
Algorithm::GooglePolylineEncoding - Google's Encoded Polyline Algorithm Format
use Algorithm::GooglePolylineEncoding;
@polyline = ({lat => 52.5, lon => 13.4}, ...);
$encoded_polyline = Algorithm::GooglePolylineEncoding::encode_polyline(@polyline);
Algorithm::GooglePolylineEncoding implements the encoded polyline algorithm format which is used in some parts of the Google Maps API. The algorithm is described in http://code.google.com/intl/en/apis/maps/documentation/polylinealgorithm.html.
This module is a light-weight version of Geo::Google::PolylineEncoder, essentially just doing the encoding part without any line simplification, and implemented without any CPAN dependencies.
Take an array of {lat => ..., lon => ...} hashrefs and return
an encoded polyline string. Latitudes and longitudes should be
expressed as decimal degrees (DD;
http://en.wikipedia.org/wiki/Decimal_degrees).
Return an encoded level.
Return just an encoded number (which may be a single longitude, or latitude, or delta).
Take an encoded polyline string and return a list of {lat => ...,
lon => ...} hashrefs.
Slaven Rezic <srezic@cpan.org>
Copyright (c) 2009,2010 Slaven Rezic. All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| Algorithm-GooglePolylineEncoding documentation | view source | Contained in the Algorithm-GooglePolylineEncoding distribution. |