Skip to content

Releases: NotWoods/spherical-geometry-js

ES Modules only

05 Jun 05:34
Compare
Choose a tag to compare

spherical-geometry-js has dropped support for Node 10 and below and no longer includes a CommonJS version. No features have been added in 3.0.0.

Improved convertLatLng

18 Aug 02:22
c7bc03b
Compare
Choose a tag to compare

Here is the first release with breaking changes. The changes are primarily internal and it is unlikely you'll encounter breaking changes.

  • convertLatLng now checks the entire prototype chain ('lat' in obj) rather than checking if an object has its own property (obj.hasOwnProperty('lat')). This allows convertLatLng to work with Javascript Coordinates returned by the Geolocation API.
  • convertLatLng will throw a TypeError if it cannot convert an object. Previously it returned undefined.
  • convertLatLng previously took a second parameter that could override the class constructor used. This behaviour was deprecated and is now removed.
  • LatLng previously stored the latitude and longitude as symbols. They are now stored as latitude and longitude properties (replacing the getters).

v1.4.0 - LatLngBounds

28 Mar 17:41
Compare
Choose a tag to compare
  • Added LatLngBounds class, porting most features from the LatLngBounds class in the Google Maps API.
  • LatLng instances are now iterable, so you can use array destructing with them.

v1.3.0 - GTFS and Javascript Coordinates

24 Mar 18:07
Compare
Choose a tag to compare
  • Can now convert Javascript Coordinates and other objects with latitude and longitude properties.
  • Can now convert GTFS stops and other objects with lat and lon properties.
  • convertLatLng has more test coverage.

v1.2.0 - computeOffsetOrigin

01 Feb 05:25
Compare
Choose a tag to compare

To celebrate 25k downloads, I've finally added computeOffsetOrigin!

v1.1.2 - Support older node versions

14 Dec 18:52
Compare
Choose a tag to compare
  • Removed trailing function commas so older node versions can run the code without transpiling
  • Added doc comments to LatLngLike and convertLatLng.

v1.1.0 - TypeScript typings and bugfixes

13 Dec 01:11
Compare
Choose a tag to compare

This library turned out to be much more popular than I expected, so I've updated it with some quality of life improvements.

  • TypeScript typings are now available
  • Improved tests
  • Fixed bugs in computeArea/computeSignedArea (reported by email)
  • Fixed bugs in interpolate
  • Tweaked toString so it matches Google Maps more closely.

Now available on npm from me directly.

1.1.1

13 Dec 01:12
Compare
Choose a tag to compare
1.1.1 Pre-release
Pre-release
Longitude may not be a float. This is better.