Simplify geometry using the Ramer–Douglas–Peucker algorithm.
If you need to simplify geometries, for instance reducing the number of points in a polygon, this will help you. You could use this in Leaflet.
var simplify = ;var linestring = 00 253 50;console;console;
0 0 25 3 5 00 0 5 0
You can see an example here, which uses Leaflet: http://seabre.github.io/simplify-geometry/
With example code here: https://github.com/seabre/simplify-geometry/tree/master/examples/browser