/[drupal]/contributions/modules/geonames/geonames_hierarchy.module
ViewVC logotype

Contents of /contributions/modules/geonames/geonames_hierarchy.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download) (as text)
Thu Sep 20 10:55:58 2007 UTC (2 years, 2 months ago) by serosero
Branch: MAIN
CVS Tags: HEAD
Branch point for: DRUPAL-5, DRUPAL-6--2
File MIME type: text/x-php
First commit for Geonames API
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 }

  ViewVC Help
Powered by ViewVC 1.1.2