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


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



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.


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 (


    say $location->kind;

Type of the object, such as street or house.


    say $location->address;

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


    say $location->country;

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


    say $location->country;

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


    say $location->thoroughfare;

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


    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.


    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.


Andrew Shitov, <>


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