/trunk/jrest/services/Coel.php |
---|
699,7 → 699,8 |
} |
$fullquery = 'http://nominatim.openstreetmap.org/search.php?' . http_build_query($query); |
$r = json_decode(file_get_contents($fullquery)); |
$ctx = stream_context_create(array('http' => array( 'timeout' => '4' ))); |
$r = json_decode(file_get_contents($fullquery, FALSE, $ctx)); |
error_log(sprintf("COEL: Nominatim request returned %d result(s) [%s]", count($r), $fullquery)); |
if($r && isset($r[0])) { |
$lonlat['lon'] = $r[0]->lon; |