{"id":5287,"date":"2025-02-21T06:52:20","date_gmt":"2025-02-20T23:52:20","guid":{"rendered":"https:\/\/all-arounds.com\/?page_id=5287"},"modified":"2025-02-24T09:49:56","modified_gmt":"2025-02-24T02:49:56","slug":"gps-route-calculator","status":"publish","type":"page","link":"https:\/\/all-arounds.com\/en\/free-apps\/gps-route-calculator\/","title":{"rendered":"GPS Route Calculator"},"content":{"rendered":"<p>[et_pb_section fb_built=&#8221;1&#8243; admin_label=&#8221;Header&#8221; _builder_version=&#8221;4.25.0&#8243; _module_preset=&#8221;default&#8221; locked=&#8221;off&#8221; collapsed=&#8221;on&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_row _builder_version=&#8221;4.25.0&#8243; _module_preset=&#8221;default&#8221; background_color=&#8221;gcid-a674551e-c023-4666-82b8-b7448e713885&#8243; max_width=&#8221;1280px&#8221; border_radii=&#8221;off||6px|6px|&#8221; box_shadow_style=&#8221;preset4&#8243; box_shadow_horizontal=&#8221;-30vw&#8221; box_shadow_vertical=&#8221;0px&#8221; box_shadow_color=&#8221;gcid-a674551e-c023-4666-82b8-b7448e713885&#8243; global_colors_info=&#8221;{%22gcid-a674551e-c023-4666-82b8-b7448e713885%22:%91%22background_color%22,%22box_shadow_color%22%93}&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.25.0&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_heading title=&#8221;GPS Route calculator&#8221; _builder_version=&#8221;4.25.0&#8243; _module_preset=&#8221;_initial&#8221; title_font=&#8221;Poppins|500|||||||&#8221; title_text_color=&#8221;#FFFFFF&#8221; title_font_size=&#8221;72px&#8221; title_letter_spacing=&#8221;-0.05em&#8221; title_font_size_tablet=&#8221;40px&#8221; title_font_size_phone=&#8221;24px&#8221; title_font_size_last_edited=&#8221;on|desktop&#8221; global_colors_info=&#8221;{}&#8221;][\/et_pb_heading][\/et_pb_column][\/et_pb_row][\/et_pb_section][et_pb_section fb_built=&#8221;1&#8243; _builder_version=&#8221;4.27.4&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_row _builder_version=&#8221;4.27.4&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.27.4&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_code _builder_version=&#8221;4.27.4&#8243; _module_preset=&#8221;default&#8221; hover_enabled=&#8221;0&#8243; custom_css_free_form=&#8221;\/* Style the container *\/||#locationInputs {||  width: 500px; \/* Adjust width as needed *\/||  margin: 20px auto;||  padding: 20px;||  border: 1px solid #ccc;||  border-radius: 5px;||}||||\/* Style labels *\/||#locationInputs label {||  display: block;||  margin-bottom: 5px;||  font-weight: bold;||}||||\/* Style input fields *\/||#locationInputs input%91type=%22text%22%93 {||  width: 100%;||  padding: 10px;||  margin-bottom: 15px;||  border: 1px solid #ccc;||  border-radius: 3px;||  box-sizing: border-box;||}||||\/* Style buttons *\/||#locationInputs button {||  background-color: #007bff; \/* Blue background color *\/||  color: white;||  padding: 10px 20px;||  border: none;||  border-radius: 3px;||  cursor: pointer;||}&#8221; global_colors_info=&#8221;{}&#8221; sticky_enabled=&#8221;0&#8243;]<\/p>\n<div id=\"locationInputs\"><!-- [et_pb_line_break_holder] -->    <label for=\"startPoint\">Starting Point URL:<\/label><!\u2013- [et_pb_br_holder] -\u2013><!-- [et_pb_line_break_holder] -->    <input type=\"text\" id=\"startPoint\" name=\"startPoint\"><!\u2013- [et_pb_br_holder] -\u2013><!\u2013- [et_pb_br_holder] -\u2013><!-- [et_pb_line_break_holder] -->  <!-- [et_pb_line_break_holder] -->    <\/p>\n<div id=\"waypoints\"><!-- [et_pb_line_break_holder] -->      <label>Waypoints (up to 8):<\/label><!\u2013- [et_pb_br_holder] -\u2013><!-- [et_pb_line_break_holder] -->      <\/p>\n<div id=\"waypointInputs\"><!-- [et_pb_line_break_holder] -->        <\/div>\n<p><!-- [et_pb_line_break_holder] -->      <button type=\"button\" onclick=\"addWaypoint()\">Add Waypoint<\/button><!\u2013- [et_pb_br_holder] -\u2013><!\u2013- [et_pb_br_holder] -\u2013><!-- [et_pb_line_break_holder] -->    <\/div>\n<p><!-- [et_pb_line_break_holder] -->  <!-- [et_pb_line_break_holder] -->    <label for=\"destination\">Destination URL:<\/label><!\u2013- [et_pb_br_holder] -\u2013><!-- [et_pb_line_break_holder] -->    <input type=\"text\" id=\"destination\" name=\"destination\"><!\u2013- [et_pb_br_holder] -\u2013><!\u2013- [et_pb_br_holder] -\u2013><!-- [et_pb_line_break_holder] -->  <!-- [et_pb_line_break_holder] -->    <button type=\"button\" onclick=\"validateAndShow()\">Validate and Show<\/button><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->    <\/p>\n<div id=\"serverResponse\"><\/div>\n<p><!-- [et_pb_line_break_holder] -->  <!-- [et_pb_line_break_holder] -->  \t<\/p>\n<div id=\"shareableUrlDiv\"><\/div>\n<p><!-- [et_pb_line_break_holder] -->  <\/p>\n<div id=\"results\"><\/div>\n<p> <!-- [et_pb_line_break_holder] --><\/div>\n<p><!-- [et_pb_line_break_holder] -->  <!-- [et_pb_line_break_holder] -->  <script><!-- [et_pb_line_break_holder] -->    let waypointCount = 0;<!-- [et_pb_line_break_holder] -->  <!-- [et_pb_line_break_holder] -->    function addWaypoint() {<!-- [et_pb_line_break_holder] -->      if (waypointCount < 8) {<!-- [et_pb_line_break_holder] -->        const waypointInputs = document.getElementById(\"waypointInputs\");<!-- [et_pb_line_break_holder] -->        const newInput = document.createElement(\"input\");<!-- [et_pb_line_break_holder] -->        newInput.type = \"text\";<!-- [et_pb_line_break_holder] -->        newInput.name = `waypoint${waypointCount}`;<!-- [et_pb_line_break_holder] -->        newInput.placeholder = `Waypoint ${waypointCount + 1} URL`;<!-- [et_pb_line_break_holder] -->        waypointInputs.appendChild(newInput);<!-- [et_pb_line_break_holder] -->        waypointInputs.appendChild(document.createElement(\"br\"));<!-- [et_pb_line_break_holder] -->        waypointCount++;<!-- [et_pb_line_break_holder] -->      } else {<!-- [et_pb_line_break_holder] -->        alert(\"You can add a maximum of 8 waypoints.\");<!-- [et_pb_line_break_holder] -->      }<!-- [et_pb_line_break_holder] -->    }<!-- [et_pb_line_break_holder] -->  <!-- [et_pb_line_break_holder] -->    function extractLatLngFromUrl(url) {<!-- [et_pb_line_break_holder] -->      \/\/ Google Maps URL pattern (with @lat,lng)<!-- [et_pb_line_break_holder] -->      let match = url.match(\/@(-?\\d+\\.\\d+),(-?\\d+\\.\\d+)\/);<!-- [et_pb_line_break_holder] -->      if (match) {<!-- [et_pb_line_break_holder] -->        return { latitude: parseFloat(match[1]), longitude: parseFloat(match[2]) };<!-- [et_pb_line_break_holder] -->      }<!-- [et_pb_line_break_holder] -->  <!-- [et_pb_line_break_holder] -->      \/\/ Google Maps URL pattern (with q=lat,lng)<!-- [et_pb_line_break_holder] -->      match = url.match(\/q=(-?\\d+\\.\\d+),(-?\\d+\\.\\d+)\/);<!-- [et_pb_line_break_holder] -->      if (match) {<!-- [et_pb_line_break_holder] -->        return { latitude: parseFloat(match[1]), longitude: parseFloat(match[2]) };<!-- [et_pb_line_break_holder] -->      }<!-- [et_pb_line_break_holder] -->  <!-- [et_pb_line_break_holder] -->      \/\/ Google Maps URL pattern (with data=!3m1!1d(long)!2d(lat))<!-- [et_pb_line_break_holder] -->      match = url.match(\/!3m1!1d(-?\\d+\\.\\d+)!2d(-?\\d+\\.\\d+)\/);<!-- [et_pb_line_break_holder] -->      if (match) {<!-- [et_pb_line_break_holder] -->        \/\/ Note the long\/lat are reversed in this pattern<!-- [et_pb_line_break_holder] -->        return { longitude: parseFloat(match[1]), latitude: parseFloat(match[2]) };<!-- [et_pb_line_break_holder] -->      }<!-- [et_pb_line_break_holder] -->  <!-- [et_pb_line_break_holder] -->      \/\/ If none of the patterns match, return null.<!-- [et_pb_line_break_holder] -->      return null;<!-- [et_pb_line_break_holder] -->    }<!-- [et_pb_line_break_holder] -->    <!-- [et_pb_line_break_holder] -->    function generateShareableUrl(startPointCoords, waypointCoords, destinationCoords) {<!-- [et_pb_line_break_holder] -->        const origin = `${startPointCoords.latitude},${startPointCoords.longitude}`;<!-- [et_pb_line_break_holder] -->    const destination = `${destinationCoords.latitude},${destinationCoords.longitude}`;<!-- [et_pb_line_break_holder] -->    const waypoints = waypointCoords.map(coord => `${coord.latitude},${coord.longitude}`).join('|');<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->      let url = `https:\/\/www.google.com\/maps\/dir\/?api=1&origin=13.0491242,101.1215&destination=13.221111,101.24136&waypoints=12.9125932,100.8636956|13.0610771,101.128601|13.449111,101.02577|12.8247467,100.911465`;<!-- [et_pb_line_break_holder] -->      url += `&saddr=${origin}`;<!-- [et_pb_line_break_holder] -->      url += `&daddr=${destination}`; <!-- [et_pb_line_break_holder] -->      if (waypoints) {<!-- [et_pb_line_break_holder] -->          url += `+to:${waypoints}`;<!-- [et_pb_line_break_holder] -->      }<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->      return url;<!-- [et_pb_line_break_holder] -->      <!-- [et_pb_line_break_holder] -->    }<!-- [et_pb_line_break_holder] -->  <!-- [et_pb_line_break_holder] -->    function validateAndShow() {<!-- [et_pb_line_break_holder] -->      const startPointUrl = document.getElementById(\"startPoint\").value;<!-- [et_pb_line_break_holder] -->      const destinationUrl = document.getElementById(\"destination\").value;<!-- [et_pb_line_break_holder] -->      const waypointUrls = [];<!-- [et_pb_line_break_holder] -->      let isValid = true;<!-- [et_pb_line_break_holder] -->  <!-- [et_pb_line_break_holder] -->      for (let i = 0; i < waypointCount; i++) {<!-- [et_pb_line_break_holder] -->        waypointUrls.push(document.getElementsByName(`waypoint${i}`)[0].value);<!-- [et_pb_line_break_holder] -->      }<!-- [et_pb_line_break_holder] -->  <!-- [et_pb_line_break_holder] -->      \/\/ Validate and extract coordinates for start point<!-- [et_pb_line_break_holder] -->      const startPointCoords = extractLatLngFromUrl(startPointUrl);<!-- [et_pb_line_break_holder] -->      if (!startPointCoords) {<!-- [et_pb_line_break_holder] -->        alert(\"Invalid Starting Point URL.\");<!-- [et_pb_line_break_holder] -->        isValid = false;<!-- [et_pb_line_break_holder] -->      }<!-- [et_pb_line_break_holder] -->  <!-- [et_pb_line_break_holder] -->      \/\/ Validate and extract coordinates for destination<!-- [et_pb_line_break_holder] -->      const destinationCoords = extractLatLngFromUrl(destinationUrl);<!-- [et_pb_line_break_holder] -->      if (!destinationCoords) {<!-- [et_pb_line_break_holder] -->        alert(\"Invalid Destination URL.\");<!-- [et_pb_line_break_holder] -->        isValid = false;<!-- [et_pb_line_break_holder] -->      }<!-- [et_pb_line_break_holder] -->  <!-- [et_pb_line_break_holder] -->      \/\/ Validate and extract coordinates for waypoints<!-- [et_pb_line_break_holder] -->      const waypointCoords = [];<!-- [et_pb_line_break_holder] -->      for (let i = 0; i < waypointUrls.length; i++) {<!-- [et_pb_line_break_holder] -->        const coords = extractLatLngFromUrl(waypointUrls[i]);<!-- [et_pb_line_break_holder] -->        if (!coords) {<!-- [et_pb_line_break_holder] -->          alert(`Invalid Waypoint ${i + 1} URL.`);<!-- [et_pb_line_break_holder] -->          isValid = false;<!-- [et_pb_line_break_holder] -->        }<!-- [et_pb_line_break_holder] -->        waypointCoords.push(coords);<!-- [et_pb_line_break_holder] -->      }<!-- [et_pb_line_break_holder] -->  <!-- [et_pb_line_break_holder] -->      if (isValid) {<!-- [et_pb_line_break_holder] -->        \/\/ All inputs are valid, show in console<!-- [et_pb_line_break_holder] -->        \/\/console.log(\"Start Point URL:\", startPointUrl);<!-- [et_pb_line_break_holder] -->        \/\/console.log(\"Start Point Coordinates:\", startPointCoords);<!-- [et_pb_line_break_holder] -->        \/\/console.log(\"Waypoint URLs:\", waypointUrls);<!-- [et_pb_line_break_holder] -->        \/\/console.log(\"Waypoint Coordinates:\", waypointCoords);<!-- [et_pb_line_break_holder] -->        \/\/console.log(\"Destination URL:\", destinationUrl);<!-- [et_pb_line_break_holder] -->       \/\/console.log(\"Destination Coordinates:\", destinationCoords);<!-- [et_pb_line_break_holder] -->  <!-- [et_pb_line_break_holder] -->        \/\/ Optional, show on page as well.<!-- [et_pb_line_break_holder] -->        let output = \"Start Point: \" + startPointUrl + \"<!\u2013- [et_pb_br_holder] -\u2013>\";<!-- [et_pb_line_break_holder] -->        output += \"Start Point Coordinates: \" + JSON.stringify(startPointCoords) + \"<!\u2013- [et_pb_br_holder] -\u2013>\";<!-- [et_pb_line_break_holder] -->        output += \"Waypoints: \" + waypointUrls.join(\", \") + \"<!\u2013- [et_pb_br_holder] -\u2013>\";<!-- [et_pb_line_break_holder] -->        output += \"Waypoint Coordinates: \" + JSON.stringify(waypointCoords) + \"<!\u2013- [et_pb_br_holder] -\u2013>\";<!-- [et_pb_line_break_holder] -->        output += \"Destination: \" + destinationUrl + \"<!\u2013- [et_pb_br_holder] -\u2013>\";<!-- [et_pb_line_break_holder] -->        output += \"Destination Coordinates: \" + JSON.stringify(destinationCoords);<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->        \/\/ New console.log statement to print only latitude and longitude<!-- [et_pb_line_break_holder] -->        \/\/console.log(\"Coordinates:\");<!-- [et_pb_line_break_holder] -->        \/\/console.log(\"  Start:\", startPointCoords.latitude, startPointCoords.longitude);<!-- [et_pb_line_break_holder] -->        waypointCoords.forEach((coords, index) => {<!-- [et_pb_line_break_holder] -->            \/\/console.log(`  Waypoint ${index + 1}:`, coords.latitude, coords.longitude);<!-- [et_pb_line_break_holder] -->        });<!-- [et_pb_line_break_holder] -->        \/\/console.log(\"  Destination:\", destinationCoords.latitude, destinationCoords.longitude);<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->  <!-- [et_pb_line_break_holder] -->        let outputDiv = document.createElement('div');<!-- [et_pb_line_break_holder] -->        outputDiv.innerHTML = output;<!-- [et_pb_line_break_holder] -->        \/\/document.getElementById('locationInputs').appendChild(outputDiv);<!-- [et_pb_line_break_holder] -->      }<!-- [et_pb_line_break_holder] -->    <!-- [et_pb_line_break_holder] -->      if (isValid) {<!-- [et_pb_line_break_holder] -->            \/\/ All inputs are valid, prepare data for POST request<!-- [et_pb_line_break_holder] -->            const data = {<!-- [et_pb_line_break_holder] -->                start_point: startPointCoords,<!-- [et_pb_line_break_holder] -->                waypoints: waypointCoords,<!-- [et_pb_line_break_holder] -->                end_point: destinationCoords<!-- [et_pb_line_break_holder] -->            };<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->            \/\/ Get CSRF token (replace with your actual method)<!-- [et_pb_line_break_holder] -->            const csrfToken = getCsrfToken();<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->            \/\/ Send POST request<!-- [et_pb_line_break_holder] -->            \/\/ fetch('https:\/\/all-arounds.cloud\/api\/utilities\/map-route', {<!-- [et_pb_line_break_holder] -->            fetch('https:\/\/all-arounds.cloud\/api\/utilities\/map-route', {<!-- [et_pb_line_break_holder] -->                method: 'POST',<!-- [et_pb_line_break_holder] -->                headers: {<!-- [et_pb_line_break_holder] -->                    'Content-Type': 'application\/json',<!-- [et_pb_line_break_holder] -->                    'X-CSRF-TOKEN': csrfToken \/\/ Add CSRF token to header<!-- [et_pb_line_break_holder] -->                },<!-- [et_pb_line_break_holder] -->                body: JSON.stringify(data)<!-- [et_pb_line_break_holder] -->            })<!-- [et_pb_line_break_holder] -->              .then(response => {<!-- [et_pb_line_break_holder] -->                    if (!response.ok) {<!-- [et_pb_line_break_holder] -->                        throw new Error('Network response was not ok');<!-- [et_pb_line_break_holder] -->                    }<!-- [et_pb_line_break_holder] -->                    console.log(\"Response:\", response);<!-- [et_pb_line_break_holder] -->                    return response.json();<!-- [et_pb_line_break_holder] -->                })<!-- [et_pb_line_break_holder] -->              .then(data => {<!-- [et_pb_line_break_holder] -->                    \/\/console.log('Success:', data);<!-- [et_pb_line_break_holder] -->                    \/\/ Display the server response<!-- [et_pb_line_break_holder] -->                    \/\/document.getElementById('serverResponse').innerHTML = `<\/p>\n<pre>${JSON.stringify(data, null, 2)}<\/pre>\n<p>`;<!-- [et_pb_line_break_holder] -->                  \/\/ Extract total distance and traveling time<!-- [et_pb_line_break_holder] -->                    const totalDistance = parseFloat(data.distance.distance) \/ 1000.0; \/\/ .distance.text; <!-- [et_pb_line_break_holder] -->                    const travelingTime = parseFloat(data.distance.duration) \/ 60.0; \/\/data.distance.duration.text;<!-- [et_pb_line_break_holder] -->  \t\t\t\t\t\t\t\t\t\/\/const totalDistance = data.distance.response.routes.legs.distance.text;<!-- [et_pb_line_break_holder] -->  \t\t\t\t\t\t\t\t\t\/\/const travelingTime = data.distance.response.routes.legs.duration.text;<!-- [et_pb_line_break_holder] -->                    \/\/ Display the extracted information<!-- [et_pb_line_break_holder] -->                    const resultsDiv = document.getElementById(\"results\");<!-- [et_pb_line_break_holder] -->                    resultsDiv.innerHTML = `<!-- [et_pb_line_break_holder] -->                      <\/p>\n<h4>Route Information:<\/h4>\n<p><!-- [et_pb_line_break_holder] -->                      <pee>Total Distance: ${totalDistance} km(s)<\/pee><!-- [et_pb_line_break_holder] -->                      <pee>Traveling Time: ${travelingTime} minute(s)<\/pee><!-- [et_pb_line_break_holder] -->                    `;<!-- [et_pb_line_break_holder] -->              <!-- [et_pb_line_break_holder] -->                  \/\/ Generate and display shareable URL<!-- [et_pb_line_break_holder] -->                  const shareableUrl = generateShareableUrl(startPointCoords, waypointCoords, destinationCoords);<!-- [et_pb_line_break_holder] -->                  const shareableUrlDiv = document.getElementById('shareableUrlDiv'); \/\/ Create this div in your HTML<!-- [et_pb_line_break_holder] -->                  shareableUrlDiv.innerHTML = `<pee>Shareable URL: <a href=\"${shareableUrl}\" target=\"_blank\">${shareableUrl}<\/a><\/pee>`;<!-- [et_pb_line_break_holder] -->                })<!-- [et_pb_line_break_holder] -->              .catch(error => {<!-- [et_pb_line_break_holder] -->                    console.error('Error:', error);<!-- [et_pb_line_break_holder] -->                    \/\/ Display the error<!-- [et_pb_line_break_holder] -->                    document.getElementById('serverResponse').innerHTML = `<pee>Error: ${error.message}<\/pee>`;<!-- [et_pb_line_break_holder] -->                <!-- [et_pb_line_break_holder] -->                });<!-- [et_pb_line_break_holder] -->        }<!-- [et_pb_line_break_holder] -->    }<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->    function getCsrfToken() {<!-- [et_pb_line_break_holder] -->      const csrfTokenMeta = document.querySelector('meta[name=\"csrf-token\"]');<!-- [et_pb_line_break_holder] -->      return csrfTokenMeta? csrfTokenMeta.getAttribute('content'): null;<!-- [et_pb_line_break_holder] -->    }<!-- [et_pb_line_break_holder] -->  <\/script>[\/et_pb_code][\/et_pb_column][\/et_pb_row][\/et_pb_section][et_pb_section fb_built=&#8221;1&#8243; _builder_version=&#8221;4.27.4&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_row _builder_version=&#8221;4.27.4&#8243; _module_preset=&#8221;default&#8221; custom_margin=&#8221;|auto|93px|auto||&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.27.4&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_text _builder_version=&#8221;4.27.4&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;]<\/p>\n<p data-sourcepos=\"5:1-5:280\">Hey there! Need to figure out how far you&#8217;ll be traveling and how long it&#8217;ll take? This tool is your new best friend. Whether you&#8217;re planning a road trip, optimizing delivery routes, or just curious about the distance between a few spots, our GPS Route Calculator has you covered.<\/p>\n<p data-sourcepos=\"7:1-7:14\"><strong>How to Use<\/strong><\/p>\n<ol data-sourcepos=\"9:1-17:0\">\n<li data-sourcepos=\"9:1-13:0\">\n<p data-sourcepos=\"9:5-9:37\"><strong>Paste those Google Maps URLs:<\/strong><\/p>\n<ul data-sourcepos=\"10:5-13:0\">\n<li data-sourcepos=\"10:5-10:124\">Starting point: Grab the URL of your starting point from Google Maps and paste it into the &#8220;Starting Point URL&#8221; field.<\/li>\n<li data-sourcepos=\"11:5-11:109\">Waypoints (optional): Got some pit stops? Click &#8220;Add Waypoint&#8221; and paste the URLs. You can add up to 5!<\/li>\n<li data-sourcepos=\"12:5-13:0\">Destination: Paste the URL of your final stop in the &#8220;Destination URL&#8221; field.<\/li>\n<\/ul>\n<\/li>\n<li data-sourcepos=\"14:1-17:0\">\n<p data-sourcepos=\"14:5-14:31\"><strong>Hit &#8220;Validate and Show&#8221;<\/strong><\/p>\n<ul data-sourcepos=\"15:5-17:0\">\n<li data-sourcepos=\"15:5-15:76\">We&#8217;ll check your URLs and do some magic to figure out the coordinates.<\/li>\n<li data-sourcepos=\"16:5-17:0\">If everything looks good, you&#8217;ll see the total distance and travel time right there!<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p data-sourcepos=\"18:1-18:37\"><strong>Accurate Results with Google Maps<\/strong><\/p>\n<p data-sourcepos=\"20:1-20:114\">We use the Google Maps API, so you can trust that the route info is accurate and reliable. No more guessing games!<\/p>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section][et_pb_section fb_built=&#8221;1&#8243; _builder_version=&#8221;4.27.4&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_row _builder_version=&#8221;4.27.4&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.27.4&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_text _builder_version=&#8221;4.27.4&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;]<\/p>\n<p data-sourcepos=\"23:1-23:17\"><strong>Instructions:<\/strong><\/p>\n<p data-sourcepos=\"25:1-25:27\">&#8220;To calculate the distance:<\/p>\n<ol data-sourcepos=\"27:1-31:0\">\n<li data-sourcepos=\"27:1-27:117\">Enter the latitude and longitude coordinates for the first location in the &#8216;Latitude 1&#8217; and &#8216;Longitude 1&#8217; fields.<\/li>\n<li data-sourcepos=\"28:1-28:118\">Enter the latitude and longitude coordinates for the second location in the &#8216;Latitude 2&#8217; and &#8216;Longitude 2&#8217; fields.<\/li>\n<li data-sourcepos=\"29:1-29:42\">Click the &#8216;Calculate Distance&#8217; button.<\/li>\n<li data-sourcepos=\"30:1-31:0\">The calculated distance (in kilometers) will be displayed below the button.&#8221;<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section][et_pb_section fb_built=&#8221;1&#8243; _builder_version=&#8221;4.27.4&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_row _builder_version=&#8221;4.27.4&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.27.4&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_code _builder_version=&#8221;4.27.4&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;][\/et_pb_code][\/et_pb_column][\/et_pb_row][\/et_pb_section][et_pb_section fb_built=&#8221;1&#8243; _builder_version=&#8221;4.27.4&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_row _builder_version=&#8221;4.27.4&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.27.4&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;][et_pb_code disabled_on=&#8221;off|off|off&#8221; _builder_version=&#8221;4.27.4&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221;]<!-- [et_pb_line_break_holder] --><script><!-- [et_pb_line_break_holder] -->document.getElementById('image-upload-form').addEventListener('submit', async (e) => {<!-- [et_pb_line_break_holder] -->    e.preventDefault(); \/\/ Prevent default form submission<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->    const formData = new FormData(e.target); \/\/ Get form data<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->    try {<!-- [et_pb_line_break_holder] -->        const response = await fetch('https:\/\/all-arounds.cloud\/api\/utilities\/convert', {<!-- [et_pb_line_break_holder] -->            method: 'POST',<!-- [et_pb_line_break_holder] -->            body: formData<!-- [et_pb_line_break_holder] -->        });<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->        if (!response.ok) {<!-- [et_pb_line_break_holder] -->            const errorData = await response.json();<!-- [et_pb_line_break_holder] -->            console.error(\"Error:\", errorData);<!-- [et_pb_line_break_holder] -->            \/\/ Display the error message to the user<!-- [et_pb_line_break_holder] -->        } else {<!-- [et_pb_line_break_holder] -->            const data = await response.json();<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->            \/\/ Create a download link<!-- [et_pb_line_break_holder] -->            const link = document.createElement('a');<!-- [et_pb_line_break_holder] -->            link.href = data.url;<!-- [et_pb_line_break_holder] -->            link.download = 'converted-image.' + data.target_extension; \/\/ Set the filename<!-- [et_pb_line_break_holder] -->            link.style.display = 'none'; \/\/ Hide the link<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->            \/\/ Add the link to the page and trigger a click to download<!-- [et_pb_line_break_holder] -->            document.body.appendChild(link);<!-- [et_pb_line_break_holder] -->            link.click();<!-- [et_pb_line_break_holder] -->            document.body.removeChild(link);<!-- [et_pb_line_break_holder] -->        }<!-- [et_pb_line_break_holder] -->    } catch (error) {<!-- [et_pb_line_break_holder] -->        console.error(\"Error:\", error);<!-- [et_pb_line_break_holder] -->        \/\/ Handle the error<!-- [et_pb_line_break_holder] -->    }<!-- [et_pb_line_break_holder] -->});<!-- [et_pb_line_break_holder] --><\/script>[\/et_pb_code][\/et_pb_column][\/et_pb_row][\/et_pb_section][et_pb_section fb_built=&#8221;1&#8243; admin_label=&#8221;Projects&#8221; _builder_version=&#8221;4.25.0&#8243; _module_preset=&#8221;default&#8221; locked=&#8221;off&#8221; collapsed=&#8221;on&#8221; global_colors_info=&#8221;{}&#8221;][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hey there! Need to figure out how far you&#8217;ll be traveling and how long it&#8217;ll take? This tool is your new best friend. Whether you&#8217;re planning a road trip, optimizing delivery routes, or just curious about the distance between a few spots, our GPS Route Calculator has you covered. How to Use Paste those Google [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":5199,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_et_pb_use_builder":"on","_et_pb_old_content":"","_et_gb_content_width":"","_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"class_list":["post-5287","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>GPS Route Calculator - All-Around Solutions<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/all-arounds.com\/en\/free-apps\/gps-route-calculator\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"GPS Route Calculator - All-Around Solutions\" \/>\n<meta property=\"og:description\" content=\"Hey there! Need to figure out how far you&#039;ll be traveling and how long it&#039;ll take? This tool is your new best friend. Whether you&#039;re planning a road trip, optimizing delivery routes, or just curious about the distance between a few spots, our GPS Route Calculator has you covered. How to Use Paste those Google [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/all-arounds.com\/en\/free-apps\/gps-route-calculator\/\" \/>\n<meta property=\"og:site_name\" content=\"All-Around Solutions\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/IoTbyAllArounds\" \/>\n<meta property=\"article:modified_time\" content=\"2025-02-24T02:49:56+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/all-arounds.com\/en\/free-apps\/gps-route-calculator\/\",\"url\":\"https:\/\/all-arounds.com\/en\/free-apps\/gps-route-calculator\/\",\"name\":\"GPS Route Calculator - All-Around Solutions\",\"isPartOf\":{\"@id\":\"https:\/\/all-arounds.com\/en\/#website\"},\"datePublished\":\"2025-02-20T23:52:20+00:00\",\"dateModified\":\"2025-02-24T02:49:56+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/all-arounds.com\/en\/free-apps\/gps-route-calculator\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/all-arounds.com\/en\/free-apps\/gps-route-calculator\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/all-arounds.com\/en\/free-apps\/gps-route-calculator\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/all-arounds.com\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Free Apps\",\"item\":\"https:\/\/all-arounds.com\/en\/free-apps\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"GPS Route Calculator\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/all-arounds.com\/en\/#website\",\"url\":\"https:\/\/all-arounds.com\/en\/\",\"name\":\"All-Around Solutions\",\"description\":\"IoT Innovation for a Smarter, More Efficient Solutions\",\"publisher\":{\"@id\":\"https:\/\/all-arounds.com\/en\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/all-arounds.com\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/all-arounds.com\/en\/#organization\",\"name\":\"All-Around Solutions\",\"url\":\"https:\/\/all-arounds.com\/en\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/all-arounds.com\/en\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/all-arounds.com\/wp-content\/uploads\/2025\/02\/logo_allarounds_500x100_transparent.png\",\"contentUrl\":\"https:\/\/all-arounds.com\/wp-content\/uploads\/2025\/02\/logo_allarounds_500x100_transparent.png\",\"width\":500,\"height\":185,\"caption\":\"All-Around Solutions\"},\"image\":{\"@id\":\"https:\/\/all-arounds.com\/en\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/IoTbyAllArounds\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"GPS Route Calculator - All-Around Solutions","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/all-arounds.com\/en\/free-apps\/gps-route-calculator\/","og_locale":"en_US","og_type":"article","og_title":"GPS Route Calculator - All-Around Solutions","og_description":"Hey there! Need to figure out how far you'll be traveling and how long it'll take? This tool is your new best friend. Whether you're planning a road trip, optimizing delivery routes, or just curious about the distance between a few spots, our GPS Route Calculator has you covered. How to Use Paste those Google [&hellip;]","og_url":"https:\/\/all-arounds.com\/en\/free-apps\/gps-route-calculator\/","og_site_name":"All-Around Solutions","article_publisher":"https:\/\/www.facebook.com\/IoTbyAllArounds","article_modified_time":"2025-02-24T02:49:56+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/all-arounds.com\/en\/free-apps\/gps-route-calculator\/","url":"https:\/\/all-arounds.com\/en\/free-apps\/gps-route-calculator\/","name":"GPS Route Calculator - All-Around Solutions","isPartOf":{"@id":"https:\/\/all-arounds.com\/en\/#website"},"datePublished":"2025-02-20T23:52:20+00:00","dateModified":"2025-02-24T02:49:56+00:00","breadcrumb":{"@id":"https:\/\/all-arounds.com\/en\/free-apps\/gps-route-calculator\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/all-arounds.com\/en\/free-apps\/gps-route-calculator\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/all-arounds.com\/en\/free-apps\/gps-route-calculator\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/all-arounds.com\/en\/"},{"@type":"ListItem","position":2,"name":"Free Apps","item":"https:\/\/all-arounds.com\/en\/free-apps\/"},{"@type":"ListItem","position":3,"name":"GPS Route Calculator"}]},{"@type":"WebSite","@id":"https:\/\/all-arounds.com\/en\/#website","url":"https:\/\/all-arounds.com\/en\/","name":"All-Around Solutions","description":"IoT Innovation for a Smarter, More Efficient Solutions","publisher":{"@id":"https:\/\/all-arounds.com\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/all-arounds.com\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/all-arounds.com\/en\/#organization","name":"All-Around Solutions","url":"https:\/\/all-arounds.com\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/all-arounds.com\/en\/#\/schema\/logo\/image\/","url":"https:\/\/all-arounds.com\/wp-content\/uploads\/2025\/02\/logo_allarounds_500x100_transparent.png","contentUrl":"https:\/\/all-arounds.com\/wp-content\/uploads\/2025\/02\/logo_allarounds_500x100_transparent.png","width":500,"height":185,"caption":"All-Around Solutions"},"image":{"@id":"https:\/\/all-arounds.com\/en\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/IoTbyAllArounds"]}]}},"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/all-arounds.com\/en\/wp-json\/wp\/v2\/pages\/5287","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/all-arounds.com\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/all-arounds.com\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/all-arounds.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/all-arounds.com\/en\/wp-json\/wp\/v2\/comments?post=5287"}],"version-history":[{"count":30,"href":"https:\/\/all-arounds.com\/en\/wp-json\/wp\/v2\/pages\/5287\/revisions"}],"predecessor-version":[{"id":5327,"href":"https:\/\/all-arounds.com\/en\/wp-json\/wp\/v2\/pages\/5287\/revisions\/5327"}],"up":[{"embeddable":true,"href":"https:\/\/all-arounds.com\/en\/wp-json\/wp\/v2\/pages\/5199"}],"wp:attachment":[{"href":"https:\/\/all-arounds.com\/en\/wp-json\/wp\/v2\/media?parent=5287"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}