Releases: NotWoods/spherical-geometry-js
Releases · NotWoods/spherical-geometry-js
ES Modules only
Improved convertLatLng
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 allowsconvertLatLng
to work with JavascriptCoordinates
returned by the Geolocation API.convertLatLng
will throw aTypeError
if it cannot convert an object. Previously it returnedundefined
.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 aslatitude
andlongitude
properties (replacing the getters).
v1.4.0 - LatLngBounds
- Added
LatLngBounds
class, porting most features from theLatLngBounds
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
- Can now convert Javascript Coordinates and other objects with
latitude
andlongitude
properties. - Can now convert GTFS stops and other objects with
lat
andlon
properties. convertLatLng
has more test coverage.
v1.2.0 - computeOffsetOrigin
To celebrate 25k downloads, I've finally added computeOffsetOrigin
!
v1.1.2 - Support older node versions
- Removed trailing function commas so older node versions can run the code without transpiling
- Added doc comments to
LatLngLike
andconvertLatLng
.
v1.1.0 - TypeScript typings and bugfixes
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.