HI there! I know the below code calculates the north west corner long/lat coordinates of a tile, but is there a way to calculate the north east, south east or south west corner long/lat coordinates? (I'm terrible at maths...). I'm programming in java, and any zoom around 17 - 19 would do. static double tile2lon(int x, int z) { return x / Math.pow(2.0, z) * 360.0 - 180; } static double tile2lat(int y, int z) { double n = Math.PI - (2.0 * Math.PI * y) / Math.pow(2.0, z); return Math.toDegrees(Math.atan(Math.sinh(n))); } Thank you very much!
asked
xj18205 |

I just realised I can use the NW corner of the surround tiles to work out this answer!
answered
xj18205 |