Subject: | 404 Not Found |
Looks like an excellent module, but it did not work for me :( The first
example (see below) gives me an
"Error: 404 Not Found"
I guess the Google API URL has changed...?
----------------
use WebService::GoogleMaps;
# Set up a new object with a viewport of 640 x 480 pixels
my $gmap = WebService::GoogleMaps->new( 640, 480 );
# Specify a location to view
$gmap->set(
latitude => 40.750275,
longitude => -73.993034,
zoom_level => 4, # valid values are 0..14, lower value
is more zoomed
cache_dir => "/tmp", # optional, but recommended! Helps
speed up future requests
pan_x => 0, # move viewport to the east (+) or
west (-) a number of pixels
pan_y => 0, # move viewport to the south (+) or
north (-) a number of pixels
);
# create a GD object containing our bitmapped map object
$gmap->generate_gd();
# or simply
# $gmap->generate_gd(40.750275, -73.993034, 4); # latitude,
longitude, zoom_level
my $error = $gmap->error();
$error && print "Error: $error\n";
open (FH, ">", "mymap.png");
binmode FH;
print FH $gmap->{gd}->png;
close(FH);