NAME
WebService::Wikimapia - Interface to Wikimapia API.
VERSION
Version 0.01
DESCRIPTION
Wikimapia API is a system that allows you to receive data from our maps and that can easily be integrate Wikimapia Geo Data into your external application or web site. And it's all free.You need to get the API Key first from here: http://wikimapia.org/api?action=create_key Please note API is still in developing stage (beta).
CONSTRUCTOR
The only key required is 'key' which is an api key. Rest of them are optional.
+----------+-----------------------------------------------------------------------------+
| Key | Description |
+----------+-----------------------------------------------------------------------------+
| key | Wikimapia API Key. |
| disable | Option to disable the output of various parameters. You can disable fields |
| | for xml, json(p) formats. Allowed fields to disable: location, polygon. |
| 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'. |
| format | Output format. Choices: xml(default),kml,json,jsonp and binary. |
| pack | Pack output data in zipped format. Available values: none (default), gzip. |
+----------+-----------------------------------------------------------------------------+
use strict; use warnings;
use WebService::Wikimapia;
my ($key, $wiki);
$key = 'Your_API_Key';
$wiki = WebService::Wikimapia->new(key => $key);
#or
$wiki = WebService::Wikimapia->new(key => $key, format => 'json');
#or
$wiki = WebService::Wikimapia->new(key => $key, count => 20);
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
search()
Returns search results of a given query.
+---------+---------------------------------------------------------------------+
| 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 $key = 'Your_API_Key';
my $wiki = WebService::Wikimapia->new(key => $key);
print $wiki->search(q => 'Recreation', lat => 37.7887088, lon => -122.4997044);
box()
Returns object in the given boundary box.
+---------+---------------------------------------------------------------------+
| Key | Description |
+---------+---------------------------------------------------------------------+
| bbox | Coordinates of the selected box [lon_min,lat_min,lon_max,lat_max]. |
+---------+---------------------------------------------------------------------+
OR
+---------+---------------------------------------------------------------------+
| Key | Description |
+---------+---------------------------------------------------------------------+
| lon_min | Longiture Min. |
| lat_min | Latitude Min. |
| lon_max | Longitude Max. |
| lat_max | Latitude Max. |
+---------+---------------------------------------------------------------------+
OR
+---------+---------------------------------------------------------------------+
| Key | Description |
+---------+---------------------------------------------------------------------+
| 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 $key = 'Your_API_Key';
my $wiki = WebService::Wikimapia->new(key => $key);
print $wiki->box(bbox => '37.617188,55.677586,37.70507,55.7271128');
#or
print $wiki->box(lon_min => 37.617188,
lat_min => 55.677586,
lon_max => 37.70507,
lat_max => 55.7271128);
#or
print $wiki->box(x =>687, y => 328, z => 10);
object()
Returns information about object.
+---------+---------------------------------------------------------------------+
| Key | Description |
+---------+---------------------------------------------------------------------+
| id | Identifier of the object you want to get information about. |
+---------+---------------------------------------------------------------------+
use strict; use warnings;
use WebService::Wikimapia;
my $key = 'Your_API_Key';
my $wiki = WebService::Wikimapia->new(key => $key);
print $wiki->object(22139);
AUTHOR
Mohammad S Anwar, <mohammad.anwar at yahoo.com>
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:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=WebService-Wikimapia
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
LICENSE AND COPYRIGHT
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
DISCLAIMER
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.