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

does someone knows how to get lat/long from a the cursor position? thanks

asked 26 Jan '12, 18:58

Beerforfree's gravatar image

Beerforfree
94236
accept rate: 0%


Good question. It seems that the cursor does not give the coordinates. However, I have a workaround:

  • double click on the point of which you want the coordinates, the map will zoom and center
  • then click on the permalink as hinted above to get the coordinates
permanent link

answered 26 Jan '12, 21:01

gerdami's gravatar image

gerdami
696273546
accept rate: 15%

Do you mean from the map on the OSM website http://www.openstreetmap.org/ ? If so the answer is to click "permalink" at the bottom right-hand corner, and it'll appear in the URL bar.

Or perhaps you mean obtain the cursor position in Javascript on your own map using OSM data? Or something else?

permanent link

answered 26 Jan '12, 19:14

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866
accept rate: 16%

In Potlatch 2, Edit mode, drop down Options menu in top right hand corner, choose 'Show mouse latitude and longitude' and tick box. Lat and Long will appear in left top of edit screen. Is this what you want?

permanent link

answered 26 Jan '12, 20:59

gumpa's gravatar image

gumpa
732151935
accept rate: 0%

Additionnaly to the solution to use the permalink button, you can also use the firebug or webkit console, and ask the coordinates with the call:

map.center.transform(map.baseLayer.projection,map.displayProjection)
permanent link

answered 27 Jan '12, 09:58

NicolasDumoulin's gravatar image

NicolasDumoulin
3.3k42256
accept rate: 13%

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:

×144

question asked: 26 Jan '12, 18:58

question was seen: 9,679 times

last updated: 27 Jan '12, 09:58

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