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".
|
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. 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
|
I've written the following conversion functions to convert from Lat/Long coordinates to OSM pixel x,y coordinates for a given zoom level.
|
In the editor, press CTRL+SHIFT+L to display the Location Panel. |
related to the question about coordinates to pixels