Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 852273
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T07:34:00+00:00 2026-05-15T07:34:00+00:00

I used this query URL http://maps.google.com/maps?q=from+A+to+B&output=kml ,which is given in the answer to this

  • 0

I used this query URL

http://maps.google.com/maps?q=from+A+to+B&output=kml

,which is given in the answer to this question. But after I tried it, it doesn’t work with coordinates. It works with address names tho. I guess I could use google’s geocoding to get the addresses first. But I wonder if there is another way to get the walking distance between two coordinates?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T07:34:01+00:00Added an answer on May 15, 2026 at 7:34 am

    My New Answer 🙂

    Use the Google Directions API.

    It should be possible to make a request to http://maps.google.com/maps/api/directions/<json|xml>?<params> and specifying the coords as origin and destination parameter. I briefly tried it but it returned no results. Along their docs it should work, but they don’t explain in detail how to specify latitude and longitude. But they say it’s possible. Quote:

    […] origin (required) — The address or textual latitude/longitude value from which you wish to calculate directions […]

    Nevertheless, this should get you started. I would suggest going with the JSON output format. It’s much simpler to parse and should use up less bandwidth (it’s less verbose as XML).

    It works: Here’s an example URL: http://maps.google.com/maps/api/directions/json?origin=49.75332,6.50322&destination=49.71482,6.49944&mode=walking&sensor=false

    My Previous Answer

    The straight line distance can easily be determined using the Haversine formula. If you retrieve the route from Google, then you could calculate the distance of each segment and sum them up.

    A while back, I wrote down the (well-known) algorithm (Haversine) in a blog post (python and pl/sql)

    Here’s the copy of the python code:

    from math import sin, cos, radians, sqrt, atan2
    
        def lldistance(a, b):
       """
       Calculates the distance between two GPS points (decimal)
       @param a: 2-tuple of point A
       @param b: 2-tuple of point B
       @return: distance in m
       """
       r = 6367442.5             # average earth radius in m
       dLat = radians(a[0]-b[0])
       dLon = radians(a[1]-b[1])
       x = sin(dLat/2) ** 2 + \
           cos(radians(a[0])) * cos(radians(b[0])) *\
           sin(dLon/2) ** 2
       #original# y = 2 * atan2(sqrt(x), sqrt(1-x))
       y = 2 * asin(sqrt(x))
       d = r * y
    
       return d
    

    Translating this to Java should be trivial.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a URL like: http://www.google.com/test.html?d=1232&u=32 and I want to add it as a
I have used this query before: SELECT * FROM stone_list WHERE type IN ('ALEXANDRITE','AMETHYST')
I've used this MySQL query to get data: SELECT DISTINCT A.*, B.username FROM posts
Also what will be the scenarios where this query is used select * from
I used this MSDN example to construct my console host app: http://msdn.microsoft.com/en-us/library/ms731758.aspx It works
In short, I'm trying to change the given URL: http://mydomain.com/category/title/attachment/randomstring_?resolution=320x480 With http://mydomain.com/category/title/attachment/randomstring_320x480 In essence,
Removing the query string from a URL in Ruby could be done like this:
I have used this query to alter the table field: ALTER TABLE `recordstudent` CHANGE
Once, I used this query to select the number of items in order to
I'm trying to query the OpenCalais service semanticproxy.com. Unfortunately, their url format is as

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.