Subversion Repositories eFlore/Applications.cel

Compare Revisions

Ignore whitespace Rev 969 → Rev 970

/trunk/jrest/services/CoordSearch.php
21,11 → 21,11
parent::__construct($config);
$this->adresse_service_geonames = $this->config['cel_db']['url_service_geo_geonames'];
$this->adresse_service_local = $this->config['cel_db']['url_service_geo_local'];
$this->adresse_service_geonames = $this->config['cel']['url_service_geo_geonames'];
$this->adresse_service_local = $this->config['cel']['url_service_geo_local'];
$this->nom_service_geocoding = $this->config['cel_db']['nom_service_geocoding_geonames'];
$this->nom_service_reverse_geocoding = $this->config['cel_db']['nom_service_reverse_geocoding_geonames'];
$this->nom_service_geocoding = $this->config['cel']['nom_service_geocoding_geonames'];
$this->nom_service_reverse_geocoding = $this->config['cel']['nom_service_reverse_geocoding_geonames'];
}
 
/**
56,7 → 56,7
$retour = json_encode($informations_communes) ;
 
} elseif ($this->estUneRequeteGeocoding($params)) {
$informations_coord = $this->effectuerRequeteGeocodingGeonames($params['commune'],$params['code_postal'],$params['code_pays']);
 
$header = 'Content-Type: application/json; charset=UTF-8';
79,6 → 79,10
 
$commune = $this->affecterValeurParametreOuDefaut($params, 2, '*');
$code_postal = $this->affecterValeurParametreOuDefaut($params, 3, '*');
if(strlen($code_postal) > 2) {
$code_postal = substr($code_postal,0,2);
}
 
$code_pays = $this->affecterValeurParametreOuDefaut($params, 4, 'FR');
104,6 → 108,8
$infos_commune_json = @file_get_contents($this->url_service_geo_local."?lat=".$lat."&lon=".$lon);
$infos_commune = json_decode($infos_commune_json);
print_r($infos_commune);
$retour = false;
if ($this->estUnRetourOsmValide($infos_commune)) {