I have this string generated with terraformer-wkt using leaflet:
POLYGON((-66.85271859169006 10.488056634656399,-66.85351252555847 10.486178802289459,-66.85342669487 10.485250431517958,-66.84864163398743))
I want to reduce the limit of decimal places upto 5 digit .
POLYGON((-66.85271 10.48805,-66.85351 10.48617,-66.85342 10.48525,-66.84864))
I saw in javascripts how reduce convert a number into a string, keeping only 5 decimals but I dont know to how use this with my string:
var num = -66.85271859169006;
var n = num.toFixed(5);
//result would be -66.85271