Subject: | 'normal' is apparently no longer a valid size for markersString 'normal' concatenated with marker color doesn't render |
Mysteriously, static map urls generated by this module started rendering
incorrectly the week of April 20,2009. I tracked it down the the string
'normal' being prepended to the color of the marker definition.
Google's documentation doesn't indicate that 'normal' is a valid size
specifier. Their docs reproduced here:
{size} (optional) specifies the size of marker from the set {tiny, mid,
small}. If no size parameter is set, the marker will appear in its
default (normal) size.
from: http://code.google.com/apis/maps/documentation/staticmaps/#Markers
Solution:
If line 146 is changed from:
my $size = delete($opts{size}) || "normal";
to:
my $size = delete($opts{size}) || "";
The same code generates urls that now render for me.
Work around:
Explicitly set the size on markers to empty string for normal size or
to one of the other allowed size strings.
my $url = Geo::Google::StaticMaps->url(
key => "your Google Maps API key",
size => [ 400, 300 ],
center => [ 51.855970, 0.958499 ],
marker => [ {lat => 51.855970, lon => 0.958499, size => '' }
zoom => 13,
);