The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

WebService::PublicViewpoints - The Perl API to access the public-viewpoints geo-webservice.

SYNOPSIS

  use WebService::PublicViewpoints;

  my @points = WebService::PublicViewpoints->find(num => 10, country => "JP");

  for (@points) {
      say $->lat, $_->lng, $_->url;
  }

DESCRIPTION

WebService::PublicViewpoints is a Perl API to access the public-viewpoints geo-webservice available at http://public-viewpoints.appspot.com. Each viewpoint is basically a camera shoting at something.

To use it, invoke its `find` class method with constraints:

    my @points = WebService::PublicViewpoints->find(num => 10, country => "JP");

The possibile constraint key-values are:

  • num: At least 1, the maximum number of results.

  • random: "true" or "false".

  • latitude, longitude: The viewpoints around this location are wanted.

  • country_code: UK, US, JP, DE, FR.. etc.

  • city: The city name, like "Miami".

The find method returns a list of point objects, so you catch them in an array. Each point object has these attributes:

  • url: The URL of camera image.

  • country_code: UK, US, JP, DE, FR.. etc.

  • country: The name of the associated country_code.

  • state: The state abbrevation for US.

  • city: The city name.

  • lat: The latitude of this camera image.

  • lng: The longitude of this camera image.

The detail of the feasible contry/city values are unknown due to the lack of documentation of the origianl application site.

This work is a based on the work of public-viewpoints service at http://public-viewpoints.appspot.com

AUTHOR

Kang-min Liu <gugod@gugod.org>

LICENSE AND COPYRIGHT

Copyright (c) 2009, Kang-min Liu <gugod@gugod.org>.

This is free software, licensed under:

    The MIT (X11) License

DISCLAIMER OF WARRANTY

BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENSE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.