Geo-Google-StaticMaps-V2
view release on metacpan or search on metacpan
lib/Geo/Google/StaticMaps/V2.pm view on Meta::CPAN
push @q, path => $path->stringify;
}
if (defined $self->center) {
push @q, center => $self->center;
} else {
push @q, center => "Clifton, VA" if $needs_view; #we should only get here in the trival case
}
if (defined $self->zoom) {
push @q, zoom => $self->zoom;
} else {
push @q, zoom => "7" if $needs_view; #we should only get here in the trival case
}
$url->query_form(@q);
if ($self->_signer) {
$url=$self->_signer->url($self->_service => $url);
} else {
$url->scheme($self->protocol);
$url->host($self->server);
}
return $url;
}
#head2 _size
#
#size (required) defines the rectangular dimensions of the map image. This parameter takes a string of the form {horizontal_value}x{vertical_value}. For example, 500x400 defines a map 500 pixels wide by 400 pixels high. Maps smaller than 180 pixels i...
#
#cut
sub _size {
my $self=shift;
return join("x", $self->width, $self->height);
}
#head2 _signer
#
#Returns false but defined or a cached L<> object
#
#Note: This method returns false if the URL::Signature::Google::Maps::API is not installed and thus URL signatures will not be available.
#
#cut
sub _signer {
my $self=shift;
$self->{"_signer"}=shift if @_;
unless (defined $self->{"_signer"}) { #init
eval('use URL::Signature::Google::Maps::API');
if ($@) {
$self->{"_signer"}="";
} else {
$self->{"_signer"}=URL::Signature::Google::Maps::API->new(channel=>$self->channel, client=>$self->client, key=>$self->key)
unless defined($self->{"_signer"});
}
}
return $self->{"_signer"};
}
=head1 Google Enterprise Credentials
These settings are simply passed through to L<URL::Signature::Google::Maps::API>.
I recommend storing the credentials in the INI formatted file and leaving these values as undef.
=head2 client
Sets and returns the Google Enterprise Client
=cut
sub client {
my $self=shift;
$self->{"client"}=shift if @_;
return $self->{"client"};
}
=head2 key
Sets and returns the Google Enterprise Key
=cut
sub key {
my $self=shift;
$self->{"key"}=shift if @_;
return $self->{"key"};
}
=head2 channel
Sets and returns the Google Enterprise channel.
=cut
sub channel {
my $self=shift;
$self->{"channel"}=shift if @_;
return $self->{"channel"};
}
=head1 BUGS
Please log on RT and send an email to the author.
=head1 SUPPORT
DavisNetworks.com supports all Perl applications including this package.
=head1 AUTHOR
Michael R. Davis
CPAN ID: MRDVT
Satellite Tracking of People, LLC
mdavis@stopllc.com
http://www.stopllc.com/
=head1 COPYRIGHT
This program is free software licensed under the...
The General Public License (GPL) Version 2, June 1991
The full text of the license can be found in the LICENSE file included with this module.
( run in 2.624 seconds using v1.01-cache-2.11-cpan-140bd7fdf52 )