|
|
|
@ -173,15 +173,18 @@ function gis_post_edition($flux) {
|
|
|
|
|
$codesiptc = $er->h_codesIptc; |
|
|
|
|
$string_recherche = ''; |
|
|
|
|
|
|
|
|
|
if ($iptc['city']) { |
|
|
|
|
$string_recherche .= $iptc['city'] . ', '; |
|
|
|
|
} |
|
|
|
|
if ($iptc['provinceState']) { |
|
|
|
|
$string_recherche .= $iptc['provinceState'] . ', '; |
|
|
|
|
} |
|
|
|
|
if ($iptc['country']) { |
|
|
|
|
$string_recherche .= $iptc['country']; |
|
|
|
|
if ($iptc && is_array($iptc)) { |
|
|
|
|
if ($iptc['city']) { |
|
|
|
|
$string_recherche .= $iptc['city'] . ', '; |
|
|
|
|
} |
|
|
|
|
if ($iptc['provinceState']) { |
|
|
|
|
$string_recherche .= $iptc['provinceState'] . ', '; |
|
|
|
|
} |
|
|
|
|
if ($iptc['country']) { |
|
|
|
|
$string_recherche .= $iptc['country']; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (strlen($string_recherche)) { |
|
|
|
|
include_spip('inc/gis_geocode'); |
|
|
|
|
$json = gis_geocode_request('search', [ |
|
|
|
@ -210,7 +213,7 @@ function gis_post_edition($flux) {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (is_numeric($latitude) && is_numeric($longitude)) { |
|
|
|
|
if ((isset($latitude) && is_numeric($latitude)) && (isset($longitude) && is_numeric($longitude))) { |
|
|
|
|
$c = [ |
|
|
|
|
'titre' => basename($fichier), |
|
|
|
|
'lat' => $latitude, |
|
|
|
|