NAME

WebService::Wikimapia - Interface to Wikimapia API.

VERSION

Version 0.14

DESCRIPTION

Wikimapia API is a system that allows you to receive data from Wikimapia map and that can easily be integrate Wikimapia Geo Data into your external application / web site. And it's all free. You need to get the API Key first from here. Please note API is still in developing stage (beta).

Recent changes to the API by Wikimapia, marked the method search(), box() and object() deprecated.

CONSTRUCTOR

The only key required is 'api_key' which is an api key.Rest of them are optional.

    +----------+----------------------------------------------------------------+
    | Key      | Description                                                    |
    +----------+----------------------------------------------------------------+
    | api_key  | Wikimapia API Key.                                             |
    | page     | This is page number. 1 is default.                             |
    | count    | Determines the number of results/page. 50 is default.          |
    | language | Language in ISO 639-1 format. Default is 'en'.                 |
    +----------+----------------------------------------------------------------+

    use strict; use warnings;
    use WebService::Wikimapia;

    my $key       = 'Your_API_Key';
    my $wikimapia = WebService::Wikimapia->new({ api_key => $api_key });

LANGUAGE

    +-----------------------+----------------+
    | Language Name         | ISO 639-1 Code |
    +-----------------------+----------------+
    | Abkhaz                |       ab       |
    | Afar                  |       aa       |
    | Afrikaans             |       af       |
    | Akan                  |       ak       |
    | Albanian              |       sq       |
    | Amharic               |       am       |
    | Arabic                |       ar       |
    | Aragonese             |       an       |
    | Armenian              |       hy       |
    | Assamese              |       as       |
    | Avaric                |       av       |
    | Avestan               |       ae       |
    | Aymara                |       ay       |
    | Azerbaijani           |       az       |
    | Bambara               |       bm       |
    | Bashkir               |       ba       |
    | Basque                |       eu       |
    | Belarusian            |       be       |
    | Bengali               |       bn       |
    | Bihari                |       bh       |
    | Bislama               |       bi       |
    | Bosnian               |       bs       |
    | Breton                |       br       |
    | Bulgarian             |       bg       |
    | Burmese               |       my       |
    | Catalan               |       ca       |
    | Chamorro              |       ch       |
    | Chechen               |       ce       |
    | Chichewa              |       ny       |
    | Chinese               |       zh       |
    | Chuvash               |       cv       |
    | Cornish               |       kw       |
    | Corsican              |       co       |
    | Cree                  |       cr       |
    | Croatian              |       hr       |
    | Czech                 |       cs       |
    | Danish                |       da       |
    | Divehi                |       dv       |
    | Dutch                 |       nl       |
    | Dzongkha              |       dz       |
    | English               |       en       |
    | Esperanto             |       eo       |
    | Estonian              |       et       |
    | Ewe                   |       ee       |
    | Faroese               |       fo       |
    | Fijian                |       fj       |
    | Finnish               |       fi       |
    | French                |       fr       |
    | Fula                  |       ff       |
    | Galician              |       gl       |
    | Georgian              |       ka       |
    | German                |       de       |
    | Greek, Modern         |       el       |
    | Guarani               |       gn       |
    | Gujarati              |       gu       |
    | Haitian               |       ht       |
    | Hausa                 |       ha       |
    | Hebrew (modern)       |       he       |
    | Herero                |       hz       |
    | Hindi                 |       hi       |
    | Hiri Motu             |       ho       |
    | Hungarian             |       hu       |
    | Interlingua           |       ia       |
    | Indonesian            |       id       |
    | Interlingue           |       ie       |
    | Irish                 |       ga       |
    | Igbo                  |       ig       |
    | Inupiaq               |       ik       |
    | Ido                   |       io       |
    | Icelandic             |       is       |
    | Italian               |       it       |
    | Inuktitut             |       iu       |
    | Japanese              |       ja       |
    | Javanese              |       jv       |
    | Kalaallisut           |       kl       |
    | Kannada               |       kn       |
    | Kanuri                |       kr       |
    | Kashmiri              |       ks       |
    | Kazaq                 |       kk       |
    | Khmer                 |       km       |
    | Kikuyu                |       ki       |
    | Kinyarwanda           |       rw       |
    | Kirghiz               |       ky       |
    | Komi                  |       kv       |
    | Kongo                 |       kg       |
    | Korean                |       ko       |
    | Kurdish               |       ku       |
    | Kwanyama              |       kj       |
    | Latin                 |       la       |
    | Luxembourgish         |       lb       |
    | Luganda               |       lg       |
    | Limburgish            |       li       |
    | Lingala               |       ln       |
    | Lao                   |       lo       |
    | Lithuanian            |       lt       |
    | Luba-Katanga          |       lu       |
    | Latvian               |       lv       |
    | Manx                  |       gv       |
    | Macedonian            |       mk       |
    | Malagasy              |       mg       |
    | Malay                 |       ms       |
    | Malayalam             |       ml       |
    | Maltese               |       mt       |
    | Ma-ori                |       mi       |
    | Marathi               |       mr       |
    | Marshallese           |       mh       |
    | Mongolian             |       mn       |
    | Nauru                 |       na       |
    | Navajo                |       nv       |
    | Norwegian             |       nb       |
    | North Ndebele         |       nd       |
    | Nepali                |       ne       |
    | Ndonga                |       ng       |
    | Norwegian Nynorsk     |       nn       |
    | Norwegian             |       no       |
    | Nuosu                 |       ii       |
    | South Ndebele         |       nr       |
    | Occitan               |       oc       |
    | Ojibwe                |       oj       |
    | Old Church Slavonic   |       cu       |
    | Oromo                 |       om       |
    | Oriya                 |       or       |
    | Ossetian              |       os       |
    | Punjabi               |       pa       |
    | Pa-li                 |       pi       |
    | Persian               |       fa       |
    | Polish                |       pl       |
    | Pashto                |       ps       |
    | Portuguese            |       pt       |
    | Quechua               |       qu       |
    | Romansh               |       rm       |
    | Kirundi               |       rn       |
    | Romanian              |       ro       |
    | Russian               |       ru       |
    | Sanskrit              |       sa       |
    | Sardinian             |       sc       |
    | Sindhi                |       sd       |
    | Northern Sami         |       se       |
    | Samoan                |       sm       |
    | Sango                 |       sg       |
    | Serbian               |       sr       |
    | Scottish Gaelic;      |       gd       |
    | Shona                 |       sn       |
    | Sinhala               |       si       |
    | Slovak                |       sk       |
    | Slovene               |       sl       |
    | Somali                |       af       |
    | Southern Sotho        |       st       |
    | Spanish               |       es       |
    | Sundanese             |       su       |
    | Swahili               |       sw       |
    | Swati                 |       ss       |
    | Swedish               |       sv       |
    | Tamil                 |       ta       |
    | Telugu                |       te       |
    | Tajik                 |       tg       |
    | Thai                  |       th       |
    | Tigrinya              |       ti       |
    | Tibetan Standard      |       bo       |
    | Turkmen               |       tk       |
    | Tagalog               |       tl       |
    | Tswana                |       tn       |
    | Tonga (Tonga Islands) |       to       |
    | Turkish               |       tr       |
    | Tsonga                |       ts       |
    | Tatar                 |       tt       |
    | Twi                   |       tw       |
    | Tahitian              |       ty       |
    | Uighur                |       ug       |
    | Ukrainian             |       uk       |
    | Urdu                  |       ur       |
    | Uzbek                 |       uz       |
    | Venda                 |       ve       |
    | Vietnamese            |       vi       |
    | Volapuk               |       vo       |
    | Walloon               |       wa       |
    | Welsh                 |       cy       |
    | Wolof                 |       wo       |
    | Western Frisian       |       fy       |
    | Xhosa                 |       xh       |
    | Yiddish               |       yi       |
    | Yoruba                |       yo       |
    | Zhuang                |       za       |
    | Zulu                  |       zu       |
    +-----------------------+----------------+

METHODS

place_getbyid()

Returns an object of type WebService::Wikimapia::Place.

    +----------+----------------------------------------------------------------+
    | Key      | Description                                                    |
    +----------+----------------------------------------------------------------+
    | id       | Place Id (required).                                           |
    | language | Language in ISO 639-1 format. Default is 'en'.                 |
    +----------+----------------------------------------------------------------+

    use strict; use warnings;
    use WebService::Wikimapia;

    my $api_key   = 'Your_API_Key';
    my $wikimapia = WebService::Wikimapia->new({ api_key => $api_key });
    my $place     = $wikimapia->place_getbyid({ id => 55 });

    print "Place title: ", $place->title, "\n";

place_getbyarea()

Returns ref to the list of object of type WebService::Wikimapia::Place.

    +----------+----------------------------------------------------------------+
    | Key      | Description                                                    |
    +----------+----------------------------------------------------------------+
    | lon_min  | Longiture Min.                                                 |
    | lat_min  | Latitude Min.                                                  |
    | lon_max  | Longitude Max.                                                 |
    | lat_max  | Latitude Max.                                                  |
    | x        | Tile's x co-ordinate.                                          |
    | y        | Tile's y co-ordinate.                                          |
    | z        | Tile's z co-ordinate.                                          |
    | page     | This is page number. 1 is default.                             |
    | count    | Determines the number of results/page. 50 is default.          |
    | language | Language in ISO 639-1 format. Default is 'en'.                 |
    +----------+----------------------------------------------------------------+

    use strict; use warnings;
    use WebService::Wikimapia;

    my $api_key   = 'Your_API_Key';
    my $wikimapia = WebService::Wikimapia->new({ api_key => $api_key });
    my $places    = $wikimapia->place_getbyarea({
        'lon_min' => 2.292493,
        'lat_min' => 48.8590143,
        'lon_max' => 2.293493,
        'lat_max' => 48.8599143
    });

    print "Place title: ", $places->[0]->title, "\n";

place_getnearest()

Returns ref to the list of object of type WebService::Wikimapia::Place.

    +----------+----------------------------------------------------------------+
    | Key      | Description                                                    |
    +----------+----------------------------------------------------------------+
    | lon      | Longitude.                                                     |
    | lat      | Latitude.                                                      |
    | count    | Determines the number of results/page. 50 is default.          |
    | language | Language in ISO 639-1 format. Default is 'en'.                 |
    +----------+----------------------------------------------------------------+

    use strict; use warnings;
    use WebService::Wikimapia;

    my $api_key   = 'Your_API_Key';
    my $wikimapia = WebService::Wikimapia->new({ api_key => $api_key });
    my $places    = $wikimapia->place_getnearest({ 'lon' => 2.29451, 'lat' => 48.858252 });

    print "Place title: ", $places->[0]->title, "\n";

place_search()

Returns ref to the list of object of type WebService::Wikimapia::Place.

    +----------+----------------------------------------------------------------+
    | Key      | Description                                                    |
    +----------+----------------------------------------------------------------+
    | q        | Query to search in wikimapia (UTF-8).                          |
    | lat      | Coordinates of the "search point" lat means latitude.          |
    | lon      | Coordinates of the "search point" lon means longitude.         |
    | page     | This is page number. 1 is default.                             |
    | count    | Determines the number of results/page. 50 is default.          |
    | language | Language in ISO 639-1 format. Default is 'en'.                 |
    +----------+----------------------------------------------------------------+

    use strict; use warnings;
    use WebService::Wikimapia;

    my $api_key   = 'Your_API_Key';
    my $wikimapia = WebService::Wikimapia->new({ api_key => $api_key });
    my $places    = $wikimapia->place_search({ q => 'Recreation', lat => 37.7887088, lon => -122.4997044 });

    print "Place title: ", $places->[0]->title, "\n";

street_getbyid()

Returns an object of type WebService::Wikimapia::Street.

    +----------+----------------------------------------------------------------+
    | Key      | Description                                                    |
    +----------+----------------------------------------------------------------+
    | id       | Street Id (required).                                          |
    | language | Language in ISO 639-1 format. Default is 'en'.                 |
    +----------+----------------------------------------------------------------+

    use strict; use warnings;
    use WebService::Wikimapia;

    my $api_key   = 'Your_API_Key';
    my $wikimapia = WebService::Wikimapia->new({ api_key => $api_key });
    my $street    = $wikimapia->street_getbyid({ id => 1 });

    print "Street title: ", $street->title, "\n";

category_getbyid()

Returns an object of type WebService::Wikimapia::Category.

    +----------+----------------------------------------------------------------+
    | Key      | Description                                                    |
    +----------+----------------------------------------------------------------+
    | id       | Category Id (required).                                        |
    | language | Language in ISO 639-1 format. Default is 'en'.                 |
    +----------+----------------------------------------------------------------+

    use strict; use warnings;
    use WebService::Wikimapia;

    my $api_key   = 'Your_API_Key';
    my $wikimapia = WebService::Wikimapia->new({ api_key => $api_key });
    my $category  = $wikimapia->category_getbyid({  id => 203 });

    print "Category name: ", $category->name, "\n";

category_getall()

Returns ref to the list of object of type WebService::Wikimapia::Category.

    +----------+----------------------------------------------------------------+
    | Key      | Description                                                    |
    +----------+----------------------------------------------------------------+
    | page     | This is page number. 1 is default.                             |
    | count    | Determines the number of results/page. 50 is default.          |
    | language | Language in ISO 639-1 format. Default is 'en'.                 |
    +----------+----------------------------------------------------------------+

    use strict; use warnings;
    use WebService::Wikimapia;

    my $api_key    = 'Your_API_Key';
    my $wikimapia  = WebService::Wikimapia->new({ api_key => $api_key });
    my $categories = $wikimapia->category_getall;

    print "Category name: ", $categories->[0]->name, "\n";

search() [DEPRECATED]

Returns ref to the list object of type WebService::Wikimapia::Place.

    +-----+---------------------------------------------------------------------+
    | Key | Description                                                         |
    +-----+---------------------------------------------------------------------+
    | q   | Query to search in wikimapia (UTF-8).                               |
    | lat | Coordinates of the "search point" lat means latitude.               |
    | lon | Coordinates of the "search point" lon means longitude.              |
    +-----+---------------------------------------------------------------------+

    use strict; use warnings;
    use WebService::Wikimapia;

    my $api_key   = 'Your_API_Key';
    my $wikimapia = WebService::Wikimapia->new({ api_key => $api_key });
    my $places    = $wikimapia->search({ q => 'Recreation', lat => 37.7887088, lon => -122.4997044 });

    print "Place name: ", $places->[0]->name, "\n";

box() [DEPRECATED]

Returns ref to the list of object of type WebService::Wikimapia::Place.

    +---------+-------------------------------------------------------------------+
    | Key     | Description                                                       |
    +---------+-------------------------------------------------------------------+
    | bbox    | Coordinates of the selected box [lon_min,lat_min,lon_max,lat_max].|
    | lon_min | Longiture Min.                                                    |
    | lat_min | Latitude Min.                                                     |
    | lon_max | Longitude Max.                                                    |
    | lat_max | Latitude Max.                                                     |
    | x       | Tile's x co-ordinate.                                             |
    | y       | Tile's y co-ordinate.                                             |
    | z       | Tile's z co-ordinate.                                             |
    +---------+-------------------------------------------------------------------+

    use strict; use warnings;
    use WebService::Wikimapia;

    my $api_key   = 'Your_API_Key';
    my $wikimapia = WebService::Wikimapia->new({ api_key => $api_key });
    my $places    = $wikimapia->box({ bbox => '37.617188,55.677586,37.70507,55.7271128' });

    print "Place name: ", $places->[0]->name, "\n";

object() [DEPRECATED]

Returns an object of type WebService::Wikimapia::Object.

    +---------+-----------------------------------------------------------------+
    | Key     | Description                                                     |
    +---------+-----------------------------------------------------------------+
    | id      | Identifier of the object you want to get information about.     |
    +---------+-----------------------------------------------------------------+

    use strict; use warnings;
    use WebService::Wikimapia;

    my $api_key   = 'Your_API_Key';
    my $wikimapia = WebService::Wikimapia->new({ api_key => $api_key });
    my $object    = $wikimapia->object(22139);

    print "Title: ", $object->title, "\n";

AUTHOR

Mohammad S Anwar, <mohammad.anwar at yahoo.com>

REPOSITORY

https://github.com/manwar/WebService-Wikimapia

BUGS

Please report any bugs or feature requests to bug-webservice-wikimapia at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=WebService-Wikimapia. I will be notified and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc WebService::Wikimapia

You can also look for information at:

LICENSE AND COPYRIGHT

Copyright (C) 2011 - 2015 Mohammad S Anwar.

This program is free software; you can redistribute it and/or modify it under the terms of the the Artistic License (2.0). You may obtain a copy of the full license at:

http://www.perlfoundation.org/artistic_license_2_0

Any use, modification, and distribution of the Standard or Modified Versions is governed by this Artistic License.By using, modifying or distributing the Package, you accept this license. Do not use, modify, or distribute the Package, if you do not accept this license.

If your Modified Version has been derived from a Modified Version made by someone other than you,you are nevertheless required to ensure that your Modified Version complies with the requirements of this license.

This license does not grant you the right to use any trademark, service mark, tradename, or logo of the Copyright Holder.

This license includes the non-exclusive, worldwide, free-of-charge patent license to make, have made, use, offer to sell, sell, import and otherwise transfer the Package with respect to any patent claims licensable by the Copyright Holder that are necessarily infringed by the Package. If you institute patent litigation (including a cross-claim or counterclaim) against any party alleging that the Package constitutes direct or contributory patent infringement,then this Artistic License to you shall terminate on the date that such litigation is filed.

Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.