forked from qwerty/tupali
correcion en nominatim
This commit is contained in:
parent
b931ef2e79
commit
979b28f76d
@ -4251,8 +4251,11 @@ function geocoder($valor,$campo){
|
||||
$respuesta = new xajaxResponse('utf-8');
|
||||
if(strlen($valor) > 3) {
|
||||
$valor = urlencode($valor);
|
||||
$json = "https://nominatim.openstreetmap.org/search.php?format=json&limit=5&addressdetails=1&q=$valor";
|
||||
$json = "https://nominatim.openstreetmap.org/search.php?format=json&limit=5&addressdetails=1&q=$valor&email=info@tupale.co";
|
||||
$data = file_get_contents("$json");
|
||||
if ($data=='429 Too Many Requests'){
|
||||
return $data;
|
||||
}
|
||||
$geocoder = json_decode($data, true);
|
||||
if($data ==="[]") {$vacio="
|
||||
<a class='pull-right' onclick=\"xajax_limpia_div('muestra_geocoder'); \"><i class='glyphicon glyphicon-remove-sign'></i></a>
|
||||
|
Loading…
Reference in New Issue
Block a user