Defines default language and location for the geocoder in the configuration file.
authorStéphane Jacob <sj@m4x.org>
Thu, 23 Dec 2010 17:07:31 +0000 (18:07 +0100)
committerStéphane Jacob <sj@m4x.org>
Tue, 28 Dec 2010 10:53:19 +0000 (11:53 +0100)
Signed-off-by: Stéphane Jacob <sj@m4x.org>
classes/gmapsgeocoder.php
configs/platal.ini

index 16a2764..38eff81 100644 (file)
@@ -105,9 +105,10 @@ class GMapsGeocoder extends Geocoder {
         $parameters = array(
             'key'    => $globals->geocoder->gmaps_key,
             'sensor' => 'false',   // The queried address wasn't obtained from a GPS sensor.
+            'hl'     => $globals->geocoder->gmaps_hl,
             'oe'     => 'utf8',    // Output encoding.
             'output' => 'json',    // Output format.
-            'gl'     => 'fr',      // Location preferences (addresses are in France by default).
+            'gl'     => $globals->geocoder->gmaps_gl,
             'q'      => $address,  // The queries address.
         );
 
index a8cb4c2..4fcbe42 100644 (file)
@@ -198,6 +198,13 @@ gmaps_key = ""
 ; URL of geocoding webservice
 gmaps_url = "http://maps.google.com/maps/geo"
 
+; $globals->geocoder->gmaps_hl
+; Default output language.
+gmaps_hl = "fr"
+
+; $globals->geocoder->gmaps_gl
+; Default location preference.
+gmaps_gl = "fr"
 
 ; The lists section contains parameters used to interact with mailman.
 [Lists]