want to receive responce code of Google Map in a formated way

normansnail

New Member
I am trying to use \[code\]geopy\[/code\] and get walking distance between two locations. The problem is that the output what i get in \[code\]step\[/code\] is too complicated to understand and use further. I want to receive the output and use it in an \[code\]xml\[/code\] file. I want to break down the output so that i can generalize it and use all the response data effectively. \[code\]gmaps = GoogleMaps('AIzaSyBspfn_MChoYbj0528gFt9ewzu7mmPfYJE')address = "Aurora towers M.G road pune maharashtra india"lat, lng = gmaps.address_to_latlng(address)destination = gmaps.latlng_to_address(18.489145,73.81493)local = gmaps.local_search('cafe near ' + destination)directions = gmaps.directions(address, destination)print "Distance in meteres -- ",directions['Directions']['Distance']['meters']print "Distance in seconds -- ",directions['Directions']['Duration']['seconds']for step in directions['Directions']['Routes'][0]['Steps']: print step\[/code\]In short i want to format the data properly.can any one help ?Thank you
 
Back
Top