title: How to get bounds of a google static map?
body: <p>How to get bounds in degrees of google static map which has been returned, for example, for following request</p>
  
  <pre><code>http://maps.googleapis.com/maps/api/staticmap?center=0.0,0.0&amp;zoom=10&amp;size=640x640&amp;sensor=false
  </code></pre>
  
  <p>As I know, full Earth map is 256x256 image. This means that n vertical pixels contain x degrees, but n horizontal pixels contain 2x degrees. Right?</p>
  
  <p>As google <a href="https://developers.google.com/maps/documentation/staticmaps/">says</a>
  center defines the center of the map, equidistant from all edges of the map. As I understood equidistant in pixels (or in degrees?). And each succeeding zoom level doubles the precision in both horizontal and vertical dimensions.
  So, I can find delta value of Longitude of map for each zoom value as:</p>
  
  <pre><code>dLongitude = (HorizontalMapSizeInPixels / 256 ) * ( 360 / pow(2, zoom) );
  </code></pre>
  
  <p>Same calculations for Latitude:</p>
  
  <pre><code>dLatitude = (VerticalMapSizeInPixels / 256 ) * ( 180 / pow(2, zoom) );
  </code></pre>
  
  <p>VerticalMapSizeInPixels and HorizontalMapSizeInPixels are parameters of map size in URL.</p>
  
  <p>It's good to calculate delta value of Longitude, but for Latitude it is wrong. I cannot find delta value of Latitude, there is some <i>delta</i> error.</p>