NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

1
2

Hi Team,

I want to have two text box. what I will do I will enter two different location in these text boxes. and now I want to have distance button and onclick of distance button I want to calculate the distance between these two locations how I will do that.

Please let me know some example.

Thanks.

asked 27 Oct '10, 14:50

Vivek%20Kumar's gravatar image

Vivek Kumar
15345
accept rate: 0%


That depends what you mean by 'distance'. Distance can be the shortest path on the earth, much like a plane or a ship would use. You have many such calculators already like this.

The other way to define distance is the shortest path along roads. This is a much more difficult task since you would have to calculate the route to take. You can find these to like this.

permanent link

answered 27 Oct '10, 14:59

Gnonthgol's gravatar image

Gnonthgol ♦
13.8k16103198
accept rate: 16%

Hi Gnonthgol,

Thanks for the reply. I want both Road distance as well as air distance between the location. I want user to give location name instead of lat and lang. Do you have any example fulling the above criteria then please share with me.

Thanks, Vivek

(27 Oct '10, 17:23) Vivek Kumar

For the geodesic distance (as a plane or ship travels) you can use http://dist.petschge.de

(27 Oct '10, 20:43) petschge

Hi petschge, How we can convert location to lat/long in jquery? Thanks for the reply.

(28 Oct '10, 13:06) Vivek Kumar

Hi, I have two text box called from and to and I am inserting location in it. Suppose from text box has France and to text box england, now I want to convert from location to latitude /longitude and as well as to location to latitude and longitude. how we can do that.

I want to do in j query. Thanks for your reply.

(28 Oct '10, 17:07) Vivek Kumar

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×49

question asked: 27 Oct '10, 14:50

question was seen: 10,402 times

last updated: 28 Oct '10, 17:07

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum