-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not working encoded strings from Open Routing Machine #17
Comments
When I try the string with google's polyline decoder : https://developers.google.com/maps/documentation/utilities/polylineutility , it decodes to invalid GPS locations : (373.3211 , -1220.3076). It seems OSRM uses a higher precision than google : Project-OSRM/osrm-backend#713 I might work on being able to change the precision factor, or I can accept a merge request doing so :) |
Added support for custom precision in Encoding/Decoding. Fixes #17
@josephkandi you can use // OSRM uses a 6 digit precision
let polyline = Polyline(encodedPolyline: "ak{hRak{hR", precision: 1e6)
// or
let coordinates: [CLLocationCoordinate2D]? = decodePolyline("ak{hRak{hR", precision: 1e6) |
Thanks |
I tried this string
and it didnt output the right coordinates. I did divide them by 10 and i got the right coordinates just before adding them to the CLLocationCoordinate2D array
The text was updated successfully, but these errors were encountered: