title: Finding the lat/lng points within given bounds
body: <p>I have an issue which i can't wrap my head around :)</p>
  
  <p>Basically i have a php / mysql based system and a table which contains a set of points in lat/lng.</p>
  
  <p>On the other end i have an iOS app with Google Maps and when the camera position changes i submit the top/left, bottom/right points of the current area the user is observing (this is what i need, i don't need the visual points of the map).</p>
  
  <p>I need to be able to find a specific subset of those points by given a bounding 'box' - a rectangular area on earth - with a top/left, bottom/right point.</p>
  
  <p>This works - no issues with it.</p>
  
  <p>BUT when the map is rotated freely - things go completely wrong as the orientation of the top/left, bottom/right points is changed and ofcourse .. the mysql query finds nothing.</p>
  
  <p>Now .. it came to my mind that the fix would be to rotate the rectangular area as well - but the problem is the user can freely rotate the map and at one moment the rectangular area will no longer be a rectangular and i am not even sure how to fetch the points at this stage :)</p>
  
  <p>Has anyone had this kind of issue and how did you solve it?</p>
  
  <p>PS: Yes the easiest way is to use a circular area and a given center point but .. my client is calling it... :/</p>