Calculates distance in Leaflet Polyline