Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Route::post('/geolocate', function(){
- /*if(Request::ajax()){
- return('entra');
- $direccion = Request::get('address');
- $direccion = urlencode($direccion);
- $url = "http://maps.google.com/maps/api/geocode/json?sensor=false&address=" . $direccion;
- $response = file_get_contents($url);
- $json = json_decode($response,true);
- $lat = $json['results'][0]['geometry']['location']['lat'];
- $lng = $json['results'][0]['geometry']['location']['lng'];
- $array = array($lat, $lng);
- echo json_encode($array);
- }*/
- return 'end' ;
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement