| 1 |
<?php
|
| 2 |
// $Id$
|
| 3 |
|
| 4 |
/**
|
| 5 |
* @file
|
| 6 |
* Geonames countryinfo / by Erlend Eide, erlend(|)edesign.no
|
| 7 |
*
|
| 8 |
* IMPORTANT NOTE: http://forum.geonames.org/gforum/posts/list/119.page
|
| 9 |
* - Countries AE,CS,UM,VA, TL are missing in the XML Service
|
| 10 |
* - All countries are available from here: http://ws.geonames.org/countryInfoCSV?
|
| 11 |
*/
|
| 12 |
|
| 13 |
/**
|
| 14 |
* Service configuration
|
| 15 |
*/
|
| 16 |
function geonames_countryinfo_geoconfig($item = FALSE, $local = FALSE) {
|
| 17 |
$config = array(
|
| 18 |
'service_name' => 'countryinfo',
|
| 19 |
'service_full_name' => 'Country Info (Bounding Box, Capital, Area in square km, Population)',
|
| 20 |
'description' => 'Find countries for which postal code geocoding is available.',
|
| 21 |
'service_path' => 'countryInfo',
|
| 22 |
'credit_cost' => 1,
|
| 23 |
'result_cache_prefix' => 'couires:',
|
| 24 |
'data_cache_prefix' => 'couidat:',
|
| 25 |
'allowed_parameters' => array(
|
| 26 |
//our style geonames style
|
| 27 |
'country' => 'country',
|
| 28 |
'lang' => 'lang',
|
| 29 |
),
|
| 30 |
'columns' => array(
|
| 31 |
'countrycode',
|
| 32 |
'countryname',
|
| 33 |
'isonumeric',
|
| 34 |
'isoalpha3',
|
| 35 |
'fipscode',
|
| 36 |
'continent',
|
| 37 |
'capital',
|
| 38 |
'areainsqkm',
|
| 39 |
'population',
|
| 40 |
'currencycode',
|
| 41 |
'languages',
|
| 42 |
'geonameid',
|
| 43 |
'bboxwest',
|
| 44 |
'bboxnorth',
|
| 45 |
'bboxsouth',
|
| 46 |
'bboxeast',
|
| 47 |
),
|
| 48 |
);
|
| 49 |
return ($item ? ($local ? $config[$item] : array($config['service_name'] => $config[$item])) : array($config['service_name'] => $config));
|
| 50 |
}
|