| 1 |
<?php
|
| 2 |
// $Id$
|
| 3 |
|
| 4 |
/**
|
| 5 |
* @file
|
| 6 |
* Geonames Place Hierarchy Children / by Erlend Eide, erlend(|)edesign.no
|
| 7 |
*
|
| 8 |
* http://www.geonames.org/export/place-hierarchy.html
|
| 9 |
*/
|
| 10 |
|
| 11 |
/**
|
| 12 |
* Service configuration
|
| 13 |
*/
|
| 14 |
function geonames_hierarchy_geoconfig($item = FALSE, $local = FALSE) {
|
| 15 |
$config = array(
|
| 16 |
'service_name' => 'hierarchy',
|
| 17 |
'service_full_name' => 'Place Hierarchy: Hierarchy',
|
| 18 |
'description' => t('Find all Geonames higher up in the hierarchy of a place name.'),
|
| 19 |
'service_path' => 'hierarchy',
|
| 20 |
'credit_cost' => 1,
|
| 21 |
'result_cache_prefix' => 'hires:',
|
| 22 |
'data_cache_prefix' => 'hidat:',
|
| 23 |
'allowed_parameters' => array(
|
| 24 |
// our style // geonames style
|
| 25 |
'geonameid' => 'geonameId',
|
| 26 |
'style' => 'style',
|
| 27 |
'lang' => 'lang',
|
| 28 |
),
|
| 29 |
'required_parameters' => array(
|
| 30 |
'geonameid',
|
| 31 |
),
|
| 32 |
'required_parameters_type' => 'single',
|
| 33 |
'detect_style' => TRUE,
|
| 34 |
);
|
| 35 |
return ($item ? ($local ? $config[$item] : array($config['service_name'] => $config[$item])) : array($config['service_name'] => $config));
|
| 36 |
}
|