| Geo-Google-Latitude documentation | Contained in the Geo-Google-Latitude distribution. |
Geo::Google::Latitude::Badge - Retrieves a Google Latitude Public Location Badge
use Geo::Google::Latitude; my $gl=Geo::Google::Latitude->new; my $id=7832225593622256926; my $badge=$gl->get($id); #ISA Geo::Google::Latitude::Badge
Returns if there was an HTTP error
Return the HTTP status line
Returns the <img /> tag for the photo.
Returns the <img /> tag for the placard.
Returns a GPS::Point object
Log and send to Geo Perl.
Try Geo Perl.
Michael R. Davis
CPAN ID: MRDVT
STOP, LLC
domain=>michaelrdavis,tld=>com,account=>perl
http://www.stopllc.com/
This program is free software licensed under the...
The BSD License
The full text of the license can be found in the LICENSE file included with this module.
| Geo-Google-Latitude documentation | Contained in the Geo-Google-Latitude distribution. |
package Geo::Google::Latitude::Badge; use strict; use warnings; use base qw{Geo::Google::Latitude::Base}; use GPS::Point; our $VERSION='0.05';
sub id { my $self=shift; return $self->{"properties"}->{"id"}; }
sub error { my $self=shift; return $self->{"error"}; }
sub status { my $self=shift; return $self->{"status"}; }
sub lat { my $self=shift; return $self->{"geometry"}->{"coordinates"}->[1]; }
sub lon { my $self=shift; return $self->{"geometry"}->{"coordinates"}->[0]; }
sub timeStamp { my $self=shift; return $self->{"properties"}->{"timeStamp"}; }
sub accuracyInMeters { my $self=shift; return $self->{"properties"}->{"accuracyInMeters"}; }
sub reverseGeocode { my $self=shift; return $self->{"properties"}->{"reverseGeocode"}; }
sub photoImg { my $self=shift; return sprintf(qq{<img src="%s" height="%s" width="%s" alt="%s"/>}, $self->photoUrl, $self->photoHeight, $self->photoWidth, $self->id); }
sub photoUrl { my $self=shift; return $self->{"properties"}->{"photoUrl"}; }
sub photoWidth { my $self=shift; return $self->{"properties"}->{"photoWidth"}; }
sub photoHeight { my $self=shift; return $self->{"properties"}->{"photoHeight"}; }
sub placardImg { my $self=shift; return sprintf(qq{<img src="%s" height="%s" width="%s" alt="%s"/>}, $self->placardUrl, $self->placardHeight, $self->placardWidth, $self->reverseGeocode); }
sub placardUrl { my $self=shift; return $self->{"properties"}->{"placardUrl"}; }
sub placardWidth { my $self=shift; return $self->{"properties"}->{"placardWidth"}; }
sub placardHeight { my $self=shift; return $self->{"properties"}->{"placardHeight"}; }
sub point { my $self=shift; unless (defined($self->{"point"})) { #Fortunately all units match between APIs $self->{"point"}=GPS::Point->new(lat=>$self->lat, lon=>$self->lon, time=>$self->timeStamp, ehorizontal=>$self->accuracyInMeters); } return $self->{"point"}; }
1;