Merged
Conversation
d6fab17 to
e4d374b
Compare
e4d374b to
0926d6a
Compare
aeecdc1 to
7a20d16
Compare
7a20d16 to
5b279b1
Compare
5b279b1 to
3ec3178
Compare
|
🎉 This PR is included in version 4.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🌎 NEW FEATURE:
getGeoDiffReturns a structured diff between two geographical coordinates. Supports 9 distance units, locale‑aware output, and two accuracy modes.
FORMAT
Input
previousCoordinates: the original coordinates ([Longitude, Latitude]).coordinates: the new coordinates ([Longitude, Latitude]).optionsunit: the unit used for the returned distance.accuracy:normal(default): fastest mode, with a small error margin, based on Haversine formula.high: slower but highly precise distance. Based on Vincenty formula.maxDecimals: maximal decimals for the distance. Defaults to 2.locale: the locale of your distance. Enables a locale‑aware distance label.Output
USAGE
Input
Output
{ type: "geo", + status: "updated", diff: { + coordinates: [-0.1278, 51.5074], previousCoordinates: [2.3522, 48.8566], + direction: "north-west", + distance: 343.56, + label: "343.56 kilometers", + unit: "kilometer" } }See our website documentation