Skip to content

Releases: mapbox/cheap-ruler

v4.0.0

26 Jun 15:09
Compare
Choose a tag to compare

⚠️ This release contains a number of breaking changes:

  • cheap-ruler is now published as a ES module and no longer supports CommonJS environments.
  • Switched to first-class TypeScript types in the code (through JSDoc), so the types have changed compared to the previous ones which were maintained manually.
  • Dropped support for IE11. You can still transpile the code on your end.

v3.0.1

18 May 13:48
Compare
Choose a tag to compare

Minor fixes to the list of published files for v3.

v3.0.0

18 May 13:47
Compare
Choose a tag to compare
  • Breaking: changed the API from cheapRuler(...) to new CheapRuler(...) (more idiomatic for ES).
  • Switched to ES and exposed as a ES module. CommonJS/browser builds remain ES5-compatible.
  • Added pointToSegmentDistance(p, a, b) method.
  • Fixed all methods to work across the date line.
  • Breaking: switched from FCC formulas (based on Clarke ellipsoid) to a more modern WGS84 Ellipsoid model of the Earth, so the values calculated may change slightly.

v2.5.1

28 Nov 10:42
Compare
Choose a tag to compare
  • Fixed and documented pointOnLine t result property #30
  • Added default export for use with ES modules setups
  • Added minified build to the package
  • Added offset method to TypeScript typings

v2.5.0

07 Mar 00:19
Compare
Choose a tag to compare
  • Added ruler.offset(point, dx, dy) method.
  • Added TypeScript definition.

v2.4.1

03 May 15:27
Compare
Choose a tag to compare
  • 5x faster ruler creation #15

v2.4.0

03 May 07:54
Compare
Choose a tag to compare
  • Exposed unit conversion constants in cheapRuler.units.
  • Improved error handling for invalid units.

v2.3.0

26 Apr 14:30
Compare
Choose a tag to compare
  • Fixed broken conversion to miles.
  • Added more units: meters, yards, feet, inches, nauticalmiles.
  • Added flow types.

v2.2.0

25 Apr 12:44
Compare
Choose a tag to compare

Made all methods much more precise by using an FCC-approved formula for ellipsoidal Earth projection. #13

v2.1.0

24 Apr 13:22
Compare
Choose a tag to compare

Added ruler.lineSliceAlong.