NAME

Geo::Yandex::Location - Presents location data produced by Yandex Maps API

SYNOPSIS

my @locations = $geo->location(address => $addr);

for my $item (@locations) {
    say $item->address . ' (' . $item->kind .') ' .
        $item->latitude . ',' . $item->longitude;
}

ABSTRACT

Geo::Yandex::Location is an object which may be returned by Geo::Yandex::location method in response to search query. The object is a combination of fields that describe the location in hand.

DESCRIPTION

Normally you do not create Geo::Yandex::Location objects yourself. These objects are intended to be read-only, and are created during geographical query initiated by calling location method of Geo::Yandex instance. All the methods listed below return either a scalar with text or numeric data, or undef in case those pieces of information cannot be applied to the location. Particular fields are formed according to GML specification (http://www.opengis.net/gml/).

kind

say $location->kind;

Type of the object, such as street or house.

address

say $location->address;

Full and "correct" address of the location. This address may differ from initial request.

country

say $location->country;

The name of the country where the object is located. Note that this name may be already contained within address field.

locality

say $location->country;

The name of the locality, for example the name of the city if the location was a city.

thoroughfare

say $location->thoroughfare;

Thoroughfare name. E. g., the name of the street.

premise

say $location->premise;

Premise information (house number). May contain several parts, e. g. building part of the address.

lowerCorner, upperCorner;

say $location->lowerCorner;
say $location->lowerCorner;

Boundaries of the location. Each value is a string containing the pair of longitude and latitude. For exact format please refer to GML specification.

pos

say $location->pos

Exact position of the location. Contains two numbers (latitude and longitude), separated by space. Use longitude and latitude methods to work with these data separately.

say $location->longitude;
say $location->latitude;

Latitude and longitude of the location. These values may be obtained together with pos method.

AUTHOR

Andrew Shitov, <andy@shitov.ru>

COPYRIGHT AND LICENCE

Geo::Yandex::Location module is a free software. You may redistribute and (or) modify it under the same terms as Perl, whichever version it is.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 192:

Unknown directive: =head