Net::Flickr::Geo::YahooMaps - tools for working with geotagged Flickr photos and Yahoo! Maps
my %opts = (); getopts('c:i:', \%opts); my $cfg = Config::Simple->new($opts{'c'}); my $fl = Net::Flickr::Geo::YahooMaps->new($cfg); $fl->log()->add(Log::Dispatch::Screen->new('name' => 'scr', min_level => 'info')); my @map = $fl->mk_pinwin_map_for_photo($opts{'i'}); print Dumper(\@map); # returns : # ['/tmp/GGsf4552h.jpg', '99999992'];
Tools for working with geotagged Flickr photos and Yahoo! Maps
Options are passed to Net::Flickr::Backup using a Config::Simple object or a valid Config::Simple config file. Options are grouped by "block".
api_key
String. required
A valid Flickr API key.
api_secret
A valid Flickr Auth API secret key.
auth_token
A valid Flickr Auth API token.
The api_handler defines which XML/XPath handler to use to process API responses.
LibXML
Use XML::LibXML.
XPath
Use XML::XPath.
map_height
The height of the background map on which the pinwin/thumbnail will be placed.
Default is 1024.
map_width
The width of the background map on which the pinwin/thumbnail will be placed.
upload
Boolean.
Automatically upload newly create map images to Flickr. Photos will be tagged with the following machine tags :
flickr:photo=photo_id
Where photo_id is the photo that has been added to the map image.
flickr:map=pinwin
Default is false.
upload_public
Mark pinwin uploads to Flickr as viewable by anyone.
upload_friend
Mark pinwin uploads to Flickr as viewable only by friends.
upload_family
Mark pinwin uploads to Flickr as viewable only by family.
zoom
Int.
By default, the object will try to map the (Flickr) accuracy to the corresponding zoom level of the Modest Maps provider you have chosen. If this option is defined then it will be used as the zoom level regardless of what Flickr says.
skip_photos
Int (or array reference of ints)
Used by photoset related object methods, a list of photos to exclude from the list returned by the Flickr API.
skip_tags
String (or array reference of strings)
Used by photoset related object methods, a list of tags that all photos must not have if they are to be included in the final output.
ensure_tags
Used by photoset related object methods, a list of tags that all photos must have if they are to be included in the final output.
appid
A valid Yahoo! developers API key.
map_radius
Set the Yahoo! Map Image API 'radius' property. From the docs :
"How far (in miles) from the specified location to display on the map."
Default is none, and to use a zoom level that maps to the accuracy property of a photo.
Returns a Net::Flickr::Geo object.
Fetch a map using the Yahoo! Map Image API for a geotagged Flickr photo and place a "pinwin" style thumbnail of the photo over the map's marker.
Returns an array of arrays (kind of pointless really, but at least consistent).
The first element of the (second-level) array will be the path to the newly created map image. If uploads are enabled the newly created Flickr photo ID will be passed as the second element.
For each geotagged photo in a set, fetch a map using the Yahoo! Map Image API for a geotagged Flickr photo and place a "pinwin" style thumbnail of the photo over the map's marker.
If uploads are enabled then each map for a given photo will be added such that it appears before the photo it references.
Returns an array of arrays.
The first element of each (second-level) array reference will be the path to the newly created map image. If uploads are enabled the newly created Flickr photo ID will be passed as the second element.
0.72
$Date: 2008/08/03 17:08:40 $
Aaron Straup Cope <ascope@cpan.org>
Sadly, this still requires that you have a command-line version of ImageMagick installed to have the pinwin marker successfully composited on to the map.
The transparency is otherwise not honoured by either GD or Imager. Please for your patches or cluebats...
All uploads to Flickr are marked with a content-type of "other".
Net::Flickr::Geo
http://developer.yahoo.com/maps/rest/V1/mapImage.html
Sure, why not.
Please report all bugs via http://rt.cpan.org
Copyright (c) 2007-2008 Aaron Straup Cope. All Rights Reserved.
This is free software. You may redistribute it and/or modify it under the same terms as Perl itself.
2 POD Errors
The following errors were encountered while parsing the POD:
'=item' outside of any '=over'
You forgot a '=back' before '=head2'
To install Net::Flickr::Geo, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Flickr::Geo
CPAN shell
perl -MCPAN -e shell install Net::Flickr::Geo
For more information on module installation, please visit the detailed CPAN module installation guide.