Nobuo Danjou
and 1 contributors

NAME

Geo::Google::StaticMaps::Navigation - generates pagers for Google Static Maps

SYNOPSIS

  use Geo::Google::StaticMaps::Navigation;

  my $map = Geo::Google::StaticMaps::Navigation->new(
    key    => "your Google Maps API key",
    size   => [ 500, 400 ],
    center => [ 35.683, 139.766 ], # tokyo station
    zoom   => 9,
  );

  my $north_map_url = $map->north->url;

  # see Geo::Google::StaticMaps for detailed informations
  # of the constructor and the url method.

  my $uri = URI->new('http://example.com/map');
  my $north_map_pageurl = $map->north->pageurl($uri);

  # returns URI for next page with the map on the north like:
  # http://example.com/map?lat=36.5666495508921&lng=139.766&zoom=9

DESCRIPTION

Geo::Google::StaticMaps::Navigation generates pagers and nearby map urls for given Google Static Map informations.

METHODS

north, south, west, east

returns nearby map object for each direction.

zoom_in, zoom_out

returns zoomed map.

pageurl($old_uri)

returns URI object with query parameters for the map containing lat, lng, zoom.

nearby({lat => $move_rate, lng => $move_rate})

returns nearby map. $map->nearby({lat => 1}) is identical to $map->north, and $map->nearby({lng => -1}) is $map->west.

scale($zoom_delta)

returns zoomed map with given delta. $map->scale( 1 ) is identical to $map->zoom_in, and $map->scale( -1 ) is $map->soom_out.

AUTHOR

Nobuo Danjou <nobuo.danjou@gmail.com>

SEE ALSO

Geo::Google::StaticMaps

Geo::Mercator

http://code.google.com/apis/maps/documentation/staticmaps/

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.