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

Contents of /contributions/modules/geonames/geonames_countrysubdivision.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 countrycode / by Erlend Eide, erlend(|)edesign.no
7 */
8
9 /**
10 * Service configuration
11 */
12 function geonames_countrysubdivision_geoconfig($item = FALSE, $local = FALSE) {
13 $config = array(
14 'service_name' => 'countrysubdivision',
15 'service_full_name' => 'Country Subdivision (reverse geocoding)',
16 'description' => t('Find Country Code from latitude and longitude'),
17 'service_path' => 'countrySubdivision',
18 'credit_cost' => 1,
19 'result_cache_prefix' => 'csres:',
20 'data_cache_prefix' => 'csdat:',
21 'allowed_parameters' => array(
22 //our style geonames style
23 'lat' => 'lat',
24 'lng' => 'lng',
25 'lang' => 'lang',
26 ),
27 'required_parameters' => array( // If you have set query_defaults you should not include the parameter here
28 'lat',
29 'lng'
30 ),
31 'required_parameters_type' => 'all',
32 'columns' => array('countrycode', 'countryname', 'admincode1', 'adminname1'),
33 );
34 return ($item ? ($local ? $config[$item] : array($config['service_name'] => $config[$item])) : array($config['service_name'] => $config));
35 }

  ViewVC Help
Powered by ViewVC 1.1.2