Loading, please be patient.

Light Mode

Distance and route finder source to destination | Online

Address by Lat Long








Calculate Distance between two Lat Long

Our tool helps a user to find the distance between two latitudes and longitude. What sets us apart from other tools is that we don't require an internet connection or any sign-in technology. Instead, what our users need is a GPS service on their phone and a place to search for "latitude" and "longitude." Once they enter these values, our tool will show them the distance between these two coordinates using Google Maps APIs. This project was especially challenging because it required building front-end software in JavaScript with no backend servers required to upload data. The entire project was done with HTML, CSS, and JavaScript.

For those unfamiliar with technical concepts, I'll try to be as precise as possible:

All our maps are created using Google Maps API. You can see them on the main page of the website. The map is zoomed out so you can see your current location and its distance from a given point on Earth (the Earth's center). Some controls at the bottom enable you to zoom in and out or pan around the map. These controls also enable an interactive feature where you can drag your location by moving your mouse left or right. The software then does some calculations and updates the information on the screen.

To create a location, a user can either type it in manually or use a map to locate a spot. This is done by clicking on the map and moving the marker to an exact location. Then, it is possible to click on "Save" and add this location to our database. Once this location has been saved, you will see it show up on our map when you type in your desired latitude and longitude values.

To visualize this concept of distance we can look at our formula: distance = (initial_latitude - final_latitude) * 0.0174532925 * cos(initial_longitude - final_longitude).

This formula uses the following:

  • initial_latitude: This represents the latitude of your starting point (the Earth's center).
  • final_latitude: This represents your final destination (where you want to go). Notice that this number is negative. This is because you are traveling in the opposite direction (your starting point is at 0 degrees and your final destination is 180 degrees).
  • initial_longitude: This represents the longitude of your starting point. The degree value here indicates what part of the world you're going through. For instance, if it's a Canadian or Mexican degree, then it means that you're going through Canada or Mexico.