title: Convert pixel location to latitude/longitude & vise versa
body: <p>I need to convert latitude longitude values into pixel positions as well as do the opposite. I've found many solutions to go from lat/lng->pixel, but can't find anything on the reverse.</p>
  
  <p>A couple of notes:</p>
  
  <ul>
  <li>The map is a fixed size, no zooming, no tiles.</li>
  <li>I don't need anything super accurate, its not important.</li>
  <li>Preferably mercator projection, but not required. I'm not actually display the result. (Any 2D projection)</li>
  <li>I can't rely on any web based API's, ie: no Google Maps</li>
  </ul>
  
  <p>A solution in almost any programming language would be fine, as long as it doesn't rely on any platform specific APIs.</p>
  
  <p>This is an example of going from lat/lng->pixel:</p>
  
  <pre><code>var y = Math.round(((-1 * lat) + 90) * (this.MAP_HEIGHT / 180));
  var x = Math.round((lng + 180) * (this.MAP_WIDTH / 360));
  </code></pre>