CGI-Wiki-Plugin-Locator-Grid

 view release on metacpan or  search on metacpan

lib/CGI/Wiki/Plugin/Locator/Grid.pm  view on Meta::CPAN


  # Or in kilometres, and between a node and a point.
  my $distance = $locator->distance( from_x  => 531467,
                                     from_y  => 183246,
				     to_node => "Duke of Cambridge",
				     unit    => "kilometres" );

Defaults to metres if C<unit> is not supplied or is not recognised.
Recognised units at the moment: C<metres>, C<kilometres>.

Returns C<undef> if one of the endpoints does not exist, or does not
have both co-ordinates defined. The C<node> specification of an
endpoint overrides the x/y co-ords if both specified (but don't do
that).

B<Note:> Works to the nearest metre. Well, actually, calls C<int> and
rounds down, but if anyone cares about that they can send a patch.

=cut

sub distance {
    my ($self, %args) = @_;

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 1.308 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )