Skip Menu |

This queue is for tickets about the Geo-Google-StaticMaps CPAN distribution.

Report information
The Basics
Id: 60939
Status: new
Priority: 0/
Queue: Geo-Google-StaticMaps

People
Owner: Nobody in particular
Requestors: PEPL [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.1
Fixed in: 0.1



Subject: Critical updates for Static API V2 compatibility
* Removed 'normal' size (see #45249) * Removed obsolete API key * Use '|' as parameter delimiter instead of ','
Subject: StaticMaps.pm.0.10.diff
--- StaticMaps.pm-CPAN 2010-09-01 13:50:58.000000000 +0200 +++ StaticMaps.pm 2010-09-01 14:05:38.000000000 +0200 @@ -1,3 +1,4 @@ + =head1 NAME Geo::Google::StaticMaps - API for generating URLs for static Google Maps @@ -7,7 +8,6 @@ use Geo::Google::StaticMaps; my $url = Geo::Google::StaticMaps->url( - key => "your Google Maps API key", size => [ 400, 300 ], center => [ 51.855970, 0.958499 ], zoom => 13, @@ -22,7 +22,7 @@ use Carp; use vars qw($VERSION); -$VERSION = 0.10; +$VERSION = 0.11; sub new { my ($class, %opts) = @_; @@ -57,9 +57,7 @@ my $frame = delete($opts{frame}); $frame = ($frame ? 1 : 0) if defined $frame; my $hl = delete($opts{hl}); - my $key = delete($opts{key}); - Carp::croak("Must supply a Google Maps API Key") unless $key; Carp::croak("Must give the map size") unless $size; Carp::croak("Unsupported options: ".join(', ', keys %opts)) if %opts; @@ -74,7 +72,6 @@ span => $span, frame => $frame, hl => $hl, - key => $key, ); } @@ -142,7 +139,7 @@ $point = _normalize_point([ $lat, $lon ]); } - my $size = delete($opts{size}) || "normal"; + my $size = delete($opts{size}) || ""; my $color = delete($opts{color}) || "red"; my $letter = delete($opts{letter}) || ""; @@ -254,7 +251,6 @@ $args{span} = _make_point_string($opts{span}) if $opts{span}; $args{frame} = $opts{frame} if $opts{frame}; $args{hl} = $opts{hl} if $opts{hl}; - $args{key} = $opts{key}; my @args = map { _urlencode($_)."="._urlencode($args{$_}) } keys %args; my $qs = join('&', @args); @@ -267,7 +263,7 @@ foreach my $path (@{$opts{paths}}) { my @points_string = map { _make_point_string($_) } @{$path->{points}}; my $points_string = join('|', @points_string); - push @path_extras, "&path=".$path->{color}.",weight:".$path->{weight}.",".$points_string; + push @path_extras, "&path=".$path->{color}.",weight:".$path->{weight}."|".$points_string; } $path_extras = join('', @path_extras); } @@ -397,12 +393,6 @@ Given as a string containing a language code. This will not necessarily be supported for all parts of the world. -=head3 key - -Your Google Maps API key. This is B<required>. - -Given as a string. You must sign up for an API key from the Maps API website before you can use this API. - =head2 Points A point is a (latitude, longitude) pair. @@ -433,8 +423,7 @@ A keyword which determines what size marker will be used. -This is a string containing either "normal", "tiny", "mid" or "small", where "normal" is the largest -and the default. +This is a string containing either empty, "tiny", "mid" or "small", where empty is the largest and the default. =head3 color