Given a latitude and longitude, I can find the correct tile number - but how do I find the correct position (in pixel) on the tile?
This question is marked "community wiki".
asked 07 Sep '10, 08:14 petschge |
In the editor, press CTRL+SHIFT+L to display the Location Panel. answered 09 Jan '23, 11:19 joper34 |
I've written the following conversion functions to convert from Lat/Long coordinates to OSM pixel x,y coordinates for a given zoom level.
answered 14 Nov '11, 10:27 johnmeilak |
When you calulate the tile number according to the wiki you will actually get a floating point number. The integer part indicates which tile you are (or should be) looking at. The fractional part indicates the position within the tile. As a tile is 256 pixel wide, multiplying the fractional part with 256 will give you the pixel position from the top left. answered 07 Sep '10, 08:16 petschge Gnonthgol ♦ Can you show a detailed example? for example we have lat : 36 lon: 6 we create square earth map with real scale in autocad how we can find the position x,y of the coordinates in the map? i don't see an example or a formula in the wiki
(14 Oct '21, 06:27)
Seghier
|
related to the question about coordinates to pixels