I have an issue which i can't wrap my head around :)
Basically i have a php / mysql based system and a table which contains a set of points in lat/lng.
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).
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.
This works - no issues with it.
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.
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 :)
Has anyone had this kind of issue and how did you solve it?
PS: Yes the easiest way is to use a circular area and a given center point but .. my client is calling it... :/