The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.
# -*-cperl-*-
# $Id: googlemaps_mk_pinwin_map,v 1.1 2008/02/24 18:00:56 asc Exp $

use strict;

use Config::Simple;
use Getopt::Std;

use Log::Dispatch::Screen;
use Net::Flickr::Geo::GoogleMaps;

{
        &main();
        exit;
}

sub main {
        
        my %opts = ();
        getopts('c:i:', \%opts);

        my $cfg = Config::Simple->new($opts{'c'});

        $cfg->param("pinwin.map_height", 512);
        $cfg->param("pinwin.map_width", 512);
        
        my $fl = Net::Flickr::Geo::GoogleMaps->new($cfg);
        $fl->log()->add(Log::Dispatch::Screen->new('name' => 'scr', min_level => 'debug'));

        my $map = $fl->mk_pinwin_map_for_photo($opts{'i'});

        $fl->log()->info("wrote map to $map->[0]->[0]");
        return 1;
}