Use JSTS to generate a polygon from the route on the client side