Closed oliviertassinari closed 10 years ago
Please provide a test case (encoded string, expected points, and actual points). It is well established & known that float point precision errors exists in the PHP language. The tool "Interactive Polyline Encoder Utility" also experiences the same precision errors.
Please checkout the pu branch, and verify rounding of 1e5 is correct. I'll still need a good test case for this issue before I merge to master.
Issue fixed with Patch Release v1.2.3
Use round method instead of floor method.
Encode and decode (48.000006, 2.000004) to verify. You get (48.00001, 2). https://developers.google.com/maps/documentation/utilities/polylineutility