0.2.0 • Published 5 years ago
convert-coords v0.2.0
Convert Coordinates
This module takes a nested object in the form of two objects, lat and long, each of which is containing a pair of lat. and/or long. values demarcating a section on a map. The names of the keys are unknown to the module, only that each sub object contains two lat. or two long. values.
It returns an object like so:
{
lat: {
northBorder: 45.9,
southBorder: 47.7
},
long: {
eastBorder: -123.45,
westBorder: -123.83
}
}
This allows the incoming coordinates to be used regardless of the names of the keys used.