CGI-Wiki-Plugin-Locator-UK

 view release on metacpan or  search on metacpan

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


  # Or specify the point via latitude and longitude.
  my $distance = $locator->distance(from_lat  => 51.53,
                                    from_long => -0.1,
				    to_node   => "Duke of Cambridge",
				    unit      => "metres" );

Defaults to kilometres 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.265 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )