Skip Menu |

This queue is for tickets about the HTML-GoogleMaps CPAN distribution.

Report information
The Basics
Id: 44086
Status: resolved
Priority: 0/
Queue: HTML-GoogleMaps

Owner: Nobody in particular
Requestors: sbockelman [...]

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)

Subject: bug when passing variable to add_polyline or add_marker
Date: Thu, 12 Mar 2009 18:43:07 -0600
To: bug-HTML-GoogleMaps [...]
From: Scott Bockelman <sbockelman [...]>
Download (untitled) / with headers
text/plain 1.4k
I have been using the HTML::GoogleMaps perl package. I have run into one minor issue. Here is my code: my $polyline = '[-96.160853, 41.232668], [-96.160885, 41.232635], [-96.160761, 41.232542]'; my $map = HTML::GoogleMaps->new(key => $map_key); $map->controls('small_map_control','map_type_control'); $map->center("Omaha, NE"); $map->add_marker(point => "1210 W Dayton St, Madison, WI"); $map->add_polyline(points => [ $polyline ]); The map does not render when the coordinates are passed as a variable. I get the following error: "Use of uninitialized value in concatenation (.) or string at /usr/local/share/perl/5.10.0/HTML/ line 454." However, it does work if the coordinates are set like this: $map->add_polyline(points => [ [-96.160853, 41.232668], [-96.160885, 41.232635], [-96.160761, 41.232542] ]); The same happens when using the add_marker routine. Any assistance would be appreciated. uname -a Linux server 2.6.27-11-generic #1 SMP Thu Jan 29 19:24:39 UTC 2009 i686 GNU/Linux perl -v This is perl, v5.10.0 built for i486-linux-gnu-thread-multi Copyright 1987-2007, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at, the Perl Home Page. Thanks, Scott Bockelman
Download (untitled) / with headers
text/plain 254b
Wow, it's been two years so I'm guessing you figured this out yourself or don't care anymore. Just in case, the problem is that you're passing the polyline in as a string. If you drop the quotes and specify it as an array ref instead it'll work fine.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to