e-mergency/site — Issue #20: Stop searching for locations within a bounding box
Author: KushalP
Created: 2012-02-12 12:09:46+00:00
State: open

Currently, we search for locations within a rectangle from the user's current position.

We should instead try to calculate the distance from the user as we go through, and then `LIMIT` the query accordingly. The will become important in less built up areas where hospitals may not be within the bounding rectangle.

Reference: http://www.jongales.com/blog/2009/04/14/nearest-records-by-latitude-longitude-in-sql/