Hi,
I'm trying to calculate the Y position on a map with mercator projection given the latitude in degrees. Here's what I need:
//mapHeight might be 600 (pixels), for example
//latitudeInDegrees ranges from -90 to 90
public double CalculateY(double mapHeight, double latitudeInDegrees)
{
//what on earth do I do here to calculate the Y offset on the map?
return ???;
}
I've tried all sorts of things I've found online (including wikipedia and stackoverflow), but none of it has worked for me. I'm probably doing something stupid but I can't figure out what. Can anyone save my sanity?
Thanks