Determine the Distance Between Two Locations
In this project, we’ll calculate the distance between our current device location and another fixed location that we predetermine.[103] We provide the fixed location coordinate through latitude and longitude decimal degree values. To get a better idea about what those values represent, let’s first obtain the latitude and longitude values of our current geographic location via Google Maps.[104]
Browse Google Maps on your desktop, and find a location close to a landmark you recognize and know your approximate distance to. Now right-click anywhere close to that landmark on the map. From the menu, choose “Directions to here.” You need to be zoomed in all the way so Maps doesn’t grab the close-by landmark ...
Get Rapid Android Development now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.