https://github.com/zeroasterisk/meteor-ll-util
Meteor Package: Utilities for Latitude and Longitude
https://github.com/zeroasterisk/meteor-ll-util
Last synced: 11 months ago
JSON representation
Meteor Package: Utilities for Latitude and Longitude
- Host: GitHub
- URL: https://github.com/zeroasterisk/meteor-ll-util
- Owner: zeroasterisk
- Created: 2014-10-15T06:16:57.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-03-11T18:43:09.000Z (over 11 years ago)
- Last Synced: 2025-06-17T01:08:28.100Z (about 1 year ago)
- Language: JavaScript
- Size: 125 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Meteor Latitute and Longitude Utilities
There are many other, more rhobust LatLon tools out there... but if you want
VERY simple utilites with a small footprint, this is a good option.
## Thanks!
This is a smaller/simpler (and less featured) implementation of:
http://www.movable-type.co.uk/scripts/latlong.html
Which can be found here:
https://github.com/chrisveness/geodesy
Do you need more functionality?
You could switch to the Meteor packaged version of above: `garrilla:geodesy-libraries`
https://github.com/garrilla/geodesy-libraries-for-Meteor
### Install
```
$ meteor add zeroasterisk:ll-util
```
### Usage
```
// LL.getDestination(from, bearing, km)
to = LL.getDestination(
// from lat/lng
{
lat: 38.25896183393495,
lng: -85.74673791953198
},
// bearing [0-360], 90 = East
90,
// km, distance to travel
10
);
to == {
lat: 38.258906175821174,
lng: -85.63220682666228
};
// LL.getDistance(from, to)
km = LL.getDistance(
// from
{
lat: 38.25896183393495,
lng: -85.74673791953198
},
// to
{
lat: 38.258906175821174,
lng: -85.63220682666228
}
);
km == 9.999999999998517;
// LL.getBearing(from, to)
bearing = LL.getBearing(
// from
{
lat: 38.25896183393495,
lng: -85.74673791953198
},
// to
{
lat: 38.258906175821174,
lng: -85.63220682666228
}
);
bearing == 90;
```