Closed jd327 closed 9 years ago
Do you really need the distance at all? It was dropped completely in 2.0.15. I should remove it from the docs, unless you tell me that you need this value (and what you need it for :wink: ).
I'm using this function for store locator software to calculate the distance between users and stores. It seems like basic geo calculation that a geo library should support, what were the reasons for dropping it?
That's what geolib.getDistance(src, dest)
is meant for.
geolib.getCenter(poly)
is just to give you the center point of a polygon.
Example:
var distanceFromUserToStore = geolib.getDistance(userPosition, storePosition);
You have distance as meters everywhere in your documentation, but
getCenter
returns kilometers.geolib@2.0.14