| Line 137... |
Line 137... |
| 137 |
private function estUnRetourReverseGeocodingGeonamesValide($retour) {
|
137 |
private function estUnRetourReverseGeocodingGeonamesValide($retour) {
|
| Line 138... |
Line 138... |
| 138 |
|
138 |
|
| Line 139... |
Line 139... |
| 139 |
$valide = false;
|
139 |
$valide = false;
|
| 140 |
|
140 |
|
| 141 |
if (is_a($retour,'stdClass') && property_exists($retour,'geonames')
|
141 |
if (is_a($retour,'stdClass') && property_exists($retour,'geonames')
|
| 142 |
&& is_array($retour->geonames) && count($retour->geonames > 0)) {
|
142 |
&& is_array($retour->geonames) && count($retour->geonames) > 0) {
|
| 143 |
$objet_resultats = $retour->geonames[0];
|
143 |
$objet_resultats = $retour->geonames[0];
|
| 144 |
if (property_exists($objet_resultats,'adminName4') && property_exists($objet_resultats,'adminCode2')) {
|
144 |
if (property_exists($objet_resultats,'adminName4') && property_exists($objet_resultats,'adminCode2')) {
|
| 145 |
$valide = true;
|
145 |
$valide = true;
|
| Line 178... |
Line 178... |
| 178 |
|
178 |
|
| 179 |
private function estUnRetourGeocodingGeonamesValide($retour) {
|
179 |
private function estUnRetourGeocodingGeonamesValide($retour) {
|
| Line 180... |
Line 180... |
| 180 |
$valide = false;
|
180 |
$valide = false;
|
| 181 |
|
181 |
|
| 182 |
if (is_a($retour,'stdClass') && property_exists($retour,'postalCodes')
|
182 |
if (is_a($retour,'stdClass') && property_exists($retour,'postalCodes')
|
| 183 |
&& is_array($retour->postalCodes) && count($retour->postalCodes > 0)) {
|
183 |
&& is_array($retour->postalCodes) && count($retour->postalCodes) > 0) {
|
| 184 |
$objet_resultats = $retour->postalCodes[0];
|
184 |
$objet_resultats = $retour->postalCodes[0];
|
| 185 |
if (property_exists($objet_resultats,'lat') && property_exists($objet_resultats,'lng')) {
|
185 |
if (property_exists($objet_resultats,'lat') && property_exists($objet_resultats,'lng')) {
|
| 186 |
$valide = true;
|
186 |
$valide = true;
|