sia7h Posted October 4, 2015 Share Posted October 4, 2015 Dear my friends We are looking for any way to locate the customer adress "latitude & longitude" to help at the delivery process in quick way. Is there any way to get this automatic during the customer signing up... THANK YOU Link to comment Share on other sites More sharing options...
NemoPS Posted October 5, 2015 Share Posted October 5, 2015 You can try with a custom module, something that calls the google maps api $url = "http://maps.googleapis.com/maps/api/geocode/json?address=$address&sensor=false"; // Make the HTTP request $data = @file_get_contents($url); It will return a json array. Decode it, then dump it to check its vars. Lat and Long should be something like $LatLng = array( 'lat' => $jsondata["results"][0]["geometry"]["location"]["lat"], 'lng' => $jsondata["results"][0]["geometry"]["location"]["lng"], ); Link to comment Share on other sites More sharing options...
sia7h Posted October 5, 2015 Author Share Posted October 5, 2015 Thank you so much , but i don't have enough experience in php to manage this code. I'm searching for some thing simple to install, thank you so much Link to comment Share on other sites More sharing options...
Recommended Posts