DMXzone Google Maps Support Product Page

Answered

Need Help With Geocoding V3

Asked 22 Mar 2012 09:56:10
1
has this question
22 Mar 2012 09:56:10 Denis Hoffmann posted:
Hi,

I got some GEOCODING code for V2. Can someone help me to get this working in V3?

<?php
$geoAddress = ((isset($_POST["street"]))?$_POST["street"]:"").", ".
((isset($_POST["postcode"]))?$_POST["postcode"]:"").", ".
((isset($_POST["city"]))?$_POST["city"]:"").", ".
((isset($_POST["province"]))?$_POST["province"]:"").", ".
((isset($_POST["land"]))?$_POST["land"]:"");

function geoData($adresse, $key=2){
$handle = fopen("http://maps.google.de/maps/geo?q=".urlencode($adresse)."&sensor=false&oe=utf8&gl=en&output=csv&key=ABQIAAAAXCk6mF4VKYGQBKMVa-MEIN-API-KEY-Sey417lEIxReUsDLQDP9q-xfAPncQLPsApZABA",",r");
$data = fgetcsv($handle);
return $data[$key];
}
?>
<?php
echo geoData($geoAddress, 2);
echo geoData($geoAddress, 3)
?>


Cheers,
Denis

Replies

Replied 23 Mar 2012 07:50:18
23 Mar 2012 07:50:18 Teodor Kuduschiev replied:
Hello Denis,

I think you should check these links:

developers.google.com/maps/
groups.google.com/group/google-maps-js-api-v3

Reply to this topic