I've been using the code shown in the answer to this question:
Google Maps V3 - How to calculate the zoom level for a given bounds
but I can't seem to get my static maps to line up correctly.
In this link, I can calculate the width correctly, but not the height.
From the SO post earlier, the height should be
size * 360 / 256 / 2^Zoom
so we plug in...
600 * 360 / 256 / 2^11 = 0.41199
This means that we expect top latitude of the image to be at 30.42997 + (0.41199 / 2) = 30.63596
. But when you plot that latitude on Google Maps and zoom to the same zoom level, the point is much higher than what our image is receiving.
Any ideas on how I can calculate the height of the image that Google is sending back?