manuelbieh/Geolib — pull request #17 by wiseman (2013-06-05 22:13:25+00:00)
Title: Added getBoundsOfDistance function.

I added a function to compute a bounding box containing all points a given distance from a specified point. It's based on the explanation at http://janmatuschek.de/LatitudeLongitudeBoundingCoordinates

Note that I chose to return an array of point objects (`{latitude: ..., longitude: ...}`) instead of the single object containing 4 (or 6) coordinates that `getBounds` returns for a bounding box, because I think it's more useful to be able to use the pieces of the return value directly with other geolib functions. For example, see the unit tests I added where I can call `getDistance` directly and easily on the coordinates of the bounding box.