[PLUGINS] ~gis v4.41.1 --> v4.43.1
[lhc/web/www.git] / www / plugins / gis / action / gis_geocoder_rechercher.php
index 0fc48fb..3e7f757 100644 (file)
@@ -1,16 +1,18 @@
 <?php
+
 if (!defined('_ECRIRE_INC_VERSION')) {
        return;
 }
+
 include_spip('inc/distant');
 
 /**
- * Proxy vers le service Nomatim d'OpenStreetMap.
+ * Proxy vers le service du geocoder
  *
  * Cette fonction permet de transmettre une requete auprès du service
- * de recherche d'adresse d'OpenStreetMap (Nomatim).
+ * de recherche d'adresse d'OpenStreetMap (Nomatim ou Photon).
  *
- * Seuls les arguments spécifiques à Nomatim sont transmis.
+ * Seuls les arguments spécifiques au service sont transmis.
  */
 function action_gis_geocoder_rechercher_dist() {
        include_spip('inc/modifier');
@@ -23,7 +25,7 @@ function action_gis_geocoder_rechercher_dist() {
        /* On filtre les arguments à renvoyer à Nomatim (liste blanche) */
        $arguments = collecter_requests(array('json_callback', 'format', 'q', 'limit', 'addressdetails', 'accept-language', 'lat', 'lon'), array());
 
-       $geocoder = defined('_GIS_GEOCODER') ? _GIS_GEOCODER : 'nominatim';
+       $geocoder = defined('_GIS_GEOCODER') ? _GIS_GEOCODER : 'photon';
 
        if (!empty($arguments) && in_array($geocoder, array('photon','nominatim'))) {
                header('Content-Type: application/json; charset=UTF-8');