Hi,

I cannot collect information with google maps API V2.
In fact, I generate an api key gmaps for my domaine name, I use
exactly Google code ( 
http://code.google.com/intl/fr-FR/apis/maps/articles/phpsqlgeocode.html
) but the result is "url not loading".
The problem is juste present on this domain name. I use the same code
on an other domain (with an other key) and I don't have any problem.
A part of my code ([MY_KEY] is in reality a generated key) :

define("KEY", "[MY_KEY]");
                define("BASE_URL", "http://maps.google.com/maps/geo?
output=xml&key=".KEY);
                $prefix = "ge_";
                $address = $row[$prefix."adresse_1"]." , ".
$row[$prefix."adresse_2"]." , ".$code_postal." , ".
$row[$prefix."ville"]."";
                $id = $row[$prefix."id"];
                $request_url = BASE_URL . "&q=" . urlencode(($address);
                $xml = simplexml_load_file($request_url) or die("url not 
loading");
                $status = $xml->Response->Status->code;
                if (strcmp($status, "200") == 0)
                {

        // Successful geocode
        $geocode_pending = false;
        $coordinates = $xml->Response->Placemark->Point->coordinates;
        $coordinatesSplit = split(",", $coordinates);

        // Format: Longitude, Latitude, Altitude
        $lat = $coordinatesSplit[1];
        $lng = $coordinatesSplit[0];

          $query = sprintf("UPDATE googlemaps_entreprises" .
                     " SET ge_lat = '%s', ge_lng = '%s' " .
                     " WHERE ge_id = '%s' LIMIT 1;",
                     mysql_real_escape_string($lat),
                     mysql_real_escape_string($lng),
                     mysql_real_escape_string($id));

        $update_result = mysql_query($query);
       ........


I tried to generate an other API key but it's no solve my issue.

Please, can you help me ?

Regards,

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps API V2" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-api?hl=en.

Reply via email to