Switch lat,long and add distance format logic

The lat and long coordinates are switched in the backend so I switched
them in the frontend for now.