View Single Post
Posts: 481 | Thanked: 190 times | Joined on Feb 2006 @ Salem, OR
#109
Originally Posted by jfheintz
Is any body able to give me the right formula?
download winmapper from this site:
http://www.barghis.com/winmapper.htm

you have the source code and and the exe in the zip. you will have to look at those functions:
tile2zunit
unit2ztile
latlon2unit
unit2latlon
GetMapsForZoom

in GetMapsForZoom first 2 lines of code:
start_tilex := unit2ztile(start_unitx, zoom + 1);
start_tiley := unit2ztile(start_unity, zoom + 1);

shows you how to calculate the x, y for one tile