Welcome Guest, Not a member yet? Register   Sign In
Biostall Google Maps lib not working with non-latin letters
#2

[eluser]Dani[/eluser]
Here is some code

Code:
function geolocation($address)
{
echo "address=".$address;
$sensor="false";
$address=urlencode($address);
$geoCodeURL="http://maps.googleapis.com/maps/api/geocode/json?address=$address&sensor;=$sensor";
echo "<br>geoCodeURL=$geoCodeURL<br>";
$result = json_decode(file_get_contents($geoCodeURL), true);
echo "<hr>";print_r($result);
}

//output:
address=Nordre Torg 2 , 3513 Hønefoss , Norway

geoCodeURL=http://maps.googleapis.com/maps/api/geocode/json?address=Nordre+Torg+2,+3513+Hønefoss,+Norway&sensor=false

Array ( [results] => Array ( ) [status] => ZERO_RESULTS )


If I type the URL in the browser address field, it works fine and status = OK.


Messages In This Thread
Biostall Google Maps lib not working with non-latin letters - by El Forum - 12-04-2012, 01:50 PM



Theme © iAndrew 2016 - Forum software by © MyBB