Take the 2-minute tour ×  I have a Mercator projection map as a
JPEG and I would like to know how to relate a given x, y
coordinate to its latitude and longitude. I've looked at the
Gudermannian function but I honestly don't understand how to
take that function and apply it. Namely, what input is it
expecting? The implementation I found (JavaScript) seems to take
a range between -PI and PI, but what's the correlation between
my y-value in pixels and that range?  Also, I found this
function which takes a latitude and returns the tile for Google
Maps, which also uses Mercator. It would seem that if I knew how
to inverse this function, I'd be pretty close to having my
answer.  /*<summary>Get the vertical tile number from a latitude
using Mercator projection formula</summary>*/      private int
getMercatorLatitude(double lati)         double maxlat =
Math.PI;          double lat = lati;          if (lat > 90) lat
= lat - 180;         if (lat < -90) lat = lat + 180;          //
conversion degre=>radians         do