Algorithm-GooglePolylineEncoding
view release on metacpan or search on metacpan
xt/rt74303.t view on Meta::CPAN
return ($encodedPoints);
}
# ############## Numeric subroutines below #############################
# Documentation from Google http://www.google.com/apis/maps/documentation/polylinealgorithm.html
#
# 1. Take the initial signed value:
# -179.9832104
# 2. Take the decimal value and multiply it by 1e5, flooring the result:
# -17998321
### Jidanni: they now say 'round' the result!
sub createEncodings {
my $pointsRef = shift;
my @points = @{$pointsRef};
my $encoded_points = '';
my $pointRef = '';
my @point = ();
my $plat = 0;
my $plng = 0;
my $lat = 0;
my $lng = 0;
( run in 1.230 second using v1.01-cache-2.11-cpan-483215c6ad5 )