[OSM-newbies] Converting lat/lon to pixel within a tile

Vishwa rnvishwa at gmail.com
Wed Apr 30 07:42:15 BST 2008


Hi,

I am a newbie to the open street maps. I went through the slippy map tile
names description on the openstreetmap wiki
http://wiki.openstreetmap.org/index.php/Slippy_map_tilenames.

I retrieve the 3x3 tiles for a given location (lon, lat). The center tile
(x,y) will have the location that I intended. However, it may be anywhere
within the 256X256 pixel image. How to center the map in such a way that the
requested location is centered. In other words, how to know the pixel (x,y)
*within the center tile* for a given lon,lat value.

Thanks for any suggestions in advance...

Regards,
Vishwa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/newbies/attachments/20080430/4b4233cc/attachment.html>


More information about the newbies mailing list