lib/cloudmade/tiles.rb
def tilenums2latlon(xtile, ytile, zoom)
      factor = 2.0 ** zoom
      lon = (xtile * 360 / factor) - 180.0
      lat = Math.atan(Math.sinh(Math::PI * (1 - 2 * ytile / factor)))
      return Point.new(degrees(lat), lon)
    end
def tilenums2latlon(xtile, ytile, zoom)
      factor = 2.0 ** zoom
      lon = (xtile * 360 / factor) - 180.0
      lat = Math.atan(Math.sinh(Math::PI * (1 - 2 * ytile / factor)))
      return Point.new(degrees(lat), lon)
    end
def tilenums2latlon ( xtile , ytile , zoom ) factor = 2.0 ** zoom lon = ( xtile * 360 / factor ) - 180.0 lat = Math . atan ( Math . sinh ( Math :: PI * ( 1 - 2 * ytile / factor ) ) ) return Point . new ( degrees ( lat ) , lon ) end
Convert tile coordinates pair to latitude, longitude. Returns latitude, longitude as a CloudMade::Point object
 * +xtile+ X coordinate of the tile
 * +ytile+ Y coordinate of the tile
 * +zoom+ Zoom level
Convert tile coordinates pair to latitude longitude . Returns latitude longitude as a CloudMade :: Point object * + xtile + X coordinate of the tile * + ytile + Y coordinate of the tile * + zoom + Zoom level