HI,

I want to convert location to lat/long in jquery.

Thanks, Vivek

asked 28 Oct '10, 13:14

Vivek%20Kumar's gravatar image

Vivek Kumar
15345
accept rate: 0%

edited 01 Nov '10, 23:06

TomH's gravatar image

TomH ♦♦
3.2k83540

1

Can you detail your need and your context, please.

(28 Oct '10, 15:52) frodrigo

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, 16:57) Vivek Kumar

The Osm.org Routing Demo does exactly this by sending a JSONP request to Nominatim. You can grab a tarball and look in yours.js.

If Nominatim returns more than one result, the first one is used. It has a number of drawbacks. For example, when searching for a large city, the first result may be a border that is quite far from the actual city center.

permanent link

answered 31 Oct '10, 23:22

Nic%20Roets's gravatar image

Nic Roets
58391219
accept rate: 6%

edited 01 Nov '10, 00:37

Your problem is called geocoding and there are various tools and APIs which can help you with that. You could use Nominatim, I guess, or see e.g. Yahoo! PlaceFinder.

permanent link

answered 28 Oct '10, 17:13

Mormegil's gravatar image

Mormegil
3014
accept rate: 0%

Hi ,thanks for the reply

Do you have any example related to open layer.

(29 Oct '10, 10:21) Vivek Kumar
Your answer
toggle preview

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:

×45

question asked: 28 Oct '10, 13:14

question was seen: 5,992 times

last updated: 01 Nov '10, 23:06

powered by OSQA