*Hi,*

*Can you help me about Google Maps Recerse-Geocode.*

*I have one geocoder in php format, im useing for GPS-Tracing platform.*

*This Geocoder is not working in Kosovo but in other contry it's OK*

*<?*
* if(@$_GET['cmd'] == 'latlng')*
* {*
* $result = '';*
* $search = $_GET["lat"].','.$_GET["lng"];*
* $search = htmlentities(urlencode($search));*
* $url = 
'http://maps.googleapis.com/maps/api/geocode/json?latlng='.$search.'&sensor=false&oe=utf-8';*
* $data = @file_get_contents($url);*
* $jsondata = json_decode($data,true);*
* if(is_array($jsondata) && $jsondata['status']=="OK")*
* {*
* $result = $jsondata['results'][0]['formatted_address'];*
* }*
* echo json_encode($result);*
* }*
* if(@$_GET['cmd'] == 'address')*
* {*
* $result = array();*
* $search = htmlentities(urlencode($_GET["search"]));*
* $url = 
'http://maps.googleapis.com/maps/api/geocode/json?address='.$search.'&sensor=false&oe=utf-8';*
* $data = @file_get_contents($url);*
* $jsondata = json_decode($data,true);*
* if(is_array($jsondata) && $jsondata['status']=="OK")*
* {*
* for ($i=0; $i<count($jsondata['results']); $i++)*
* {*
* $address = $jsondata['results'][$i]['formatted_address'];*
* $lat = $jsondata['results'][$i]['geometry']['location']['lat'];*
* $lng = $jsondata['results'][$i]['geometry']['location']['lng'];*
* $result[] = array('address' => $address, 'lat' => $lat, 'lng' => $lng);*
* }*
* }*
* echo json_encode($result);*
* }*
*?>*

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-maps-js-api-v3+unsubscr...@googlegroups.com.
To post to this group, send email to google-maps-js-api-v3@googlegroups.com.
Visit this group at https://groups.google.com/group/google-maps-js-api-v3.
For more options, visit https://groups.google.com/d/optout.

Reply via email to