i try to calculate the x and y tile url in c<br> <br>the example on the wiki (in perl code) looks like <br>my $xtile = int( ($lon+180)/360 *2**$z ) ;<br> my $ytile = int( (1 - log(tan($lat*pi/180) + sec($lat*pi/180))/pi)/2 *2**$z ) ;
<br><br>i can't figure out the sec formula in the $ytile <br><br>wiki : <a href="http://wiki.openstreetmap.org/index.php/Slippy_map_tilenames">http://wiki.openstreetmap.org/index.php/Slippy_map_tilenames</a>