dyhex01 wrote:
QUOTE:
Hi there!
As it stands Google Maps is not working correctly on some server settings!
Take a look here and
here to solve this problems.
Hope it helps
//dyhex
Hi,
I looking for solution and in the file "GMapAPI.class.php"
I located the problem in "function geoGetCoords" arround the line1321.
Locate the code:
| Code: |
// if PHP5 available
$uri = "http://maps.google.com/maps/geo?q=".urlencode($address)."&output=xml&key=".$this->api_key;
$getpage = file_get_contents($uri);
$getpage = utf8_encode($getpage);
$xml = new SimpleXMLElement($getpage);
$coords = $xml->Response->Placemark->Point->coordinates;
return $coords;
|
And replace with this code:
| Code: |
// if PHP5 available
$uri = "http://maps.google.com/maps/geo?q=".urlencode($address)."&output=xml&key=".$this->api_key;
$getpage = file_get_contents($uri);
$getpage = utf8_encode($getpage);
$xml = new SimpleXMLElement($getpage);
$cds = $xml->Response->Placemark->Point->coordinates;
//New
$c = explode(",", $cds);
$coords['lon'] = $c[0];
$coords['lat'] = $c[1];
return $coords;
|
This solves my problem