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

Contents of /contributions/modules/geonames/geonames_nearbyplace.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 nearbyplace API / by Erlend Eide, erlend(|)edesign.no
7 */
8
9 /**
10 * Service configuration
11 */
12 function geonames_nearbyplace_geoconfig($item = FALSE, $local = FALSE) {
13 $config = array(
14 'service_name' => 'nearbyplace',
15 'service_full_name' => 'Find nearby Place Name (reverse geocoding)',
16 'description' => t('Find nearby place name (reverse geocoding)'),
17 'service_path' => 'findNearbyPlaceName',
18 'credit_cost' => 4,
19 'result_cache_prefix' => 'neares:',
20 'data_cache_prefix' => 'neadat:',
21 'allowed_parameters' => array(
22 //our style geonames style
23 'lat' => 'lat',
24 'lng' => 'lng',
25 'radius' => 'radius',
26 'maxrows' => 'maxRows',
27 'style' => 'style', // Default = MEDIUM
28 ),
29 'query_defaults' => array(
30 'radius' => 20
31 ),
32 'required_parameters' => array( // If you have set query_defaults you should not include the parameter here
33 'lat',
34 'lng'
35 ),
36 'required_parameters_type' => 'all',
37 );
38 return ($item ? ($local ? $config[$item] : array($config['service_name'] => $config[$item])) : array($config['service_name'] => $config));
39 }

  ViewVC Help
Powered by ViewVC 1.1.2