{"action":"closed","issue":{"url":"https://api.github.com/repos/mapbox/polyline/issues/20","repository_url":"https://api.github.com/repos/mapbox/polyline","labels_url":"https://api.github.com/repos/mapbox/polyline/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/mapbox/polyline/issues/20/comments","events_url":"https://api.github.com/repos/mapbox/polyline/issues/20/events","html_url":"https://github.com/mapbox/polyline/issues/20","id":165682141,"number":20,"title":"Classic static API can't decode Directions v5 paths","user":{"login":"danswick","id":2365503,"avatar_url":"https://avatars3.githubusercontent.com/u/2365503?v=3","gravatar_id":"","url":"https://api.github.com/users/danswick","html_url":"https://github.com/danswick","followers_url":"https://api.github.com/users/danswick/followers","following_url":"https://api.github.com/users/danswick/following{/other_user}","gists_url":"https://api.github.com/users/danswick/gists{/gist_id}","starred_url":"https://api.github.com/users/danswick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danswick/subscriptions","organizations_url":"https://api.github.com/users/danswick/orgs","repos_url":"https://api.github.com/users/danswick/repos","events_url":"https://api.github.com/users/danswick/events{/privacy}","received_events_url":"https://api.github.com/users/danswick/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-14T23:36:27Z","updated_at":"2017-04-19T01:37:24Z","closed_at":"2017-04-19T01:37:24Z","body":"A user reported a strange response from the classic static API and it looks like this may have something to do with the way directions v5 polylines are encoded. \n\nHere is the user's request: \n\nhttps://api.mapbox.com/directions/v5/mapbox/driving/-123.483547,45.938412;-122.92893,46.125485?geometries=polyline&access_token=pk.eyJ1IjoiZGxva29zIiwiYSI6ImVNRmpySFEifQ.D2fZF5erdf_oN_fYjj4C8A\n\nWhich returns this encoded polyline: \n\n```\najkwGd{tpVeNwt@sp@iEyLwv@X_p@l[_n@Bm`@ukAwwAag@_M}\\\\wm@agAcZkWie@yG}wCb`@a\\\\rKkcB`[i]sFgh@{nAixAk|@}`@yYq}Am{@eWt@c|B`l@}q@dMeu@}Cs|@pg@caAaa@axAa^qDeq@f^_v@ub@s~@zj@qc@wFqbArz@iPzi@i`@wEw[r\\\\wNyUkw@hAdCaOkKwGgh@fIsfAuK_J_MjDscAicAsyAcRgu@tHaiAjOiBoEmWf[wo@oFsaE~T{_@zf@stEaP}lBdK}qAqD}wAqYcxBbV}{HqZ_cB|KytB~Ras@wfCezBb@a`C}k@uWaM~Y\n```\n\nThe route should look like: \n\n![image](https://cloud.githubusercontent.com/assets/2365503/16858990/0b1307d2-49e0-11e6-895f-6777c20aac0c.png)\n\nWhen you plug the above polyline into the classic static api ([request](http://api.mapbox.com/v4/mapbox.streets/path%28ajkwGd%7btpVeNwt%40sp%40iEyLwv%40X_p%40l%5b_n%40Bm%60%40ukAwwAag%40_M%7d%5c%5cwm%40agAcZkWie%40yG%7dwCb%60%40a%5c%5crKkcB%60%5bi%5dsFgh%40%7bnAixAk%7c%40%7d%60%40yYq%7dAm%7b%40eWt%40c%7cB%60l%40%7dq%40dMeu%40%7dCs%7c%40pg%40caAaa%40axAa%5eqDeq%40f%5e_v%40ub%40s~%40zj%40qc%40wFqbArz%40iPzi%40i%60%40wEw%5br%5c%5cwNyUkw%40hAdCaOkKwGgh%40fIsfAuK_J_MjDscAicAsyAcRgu%40tHaiAjOiBoEmWf%5bwo%40oFsaE~T%7b_%40zf%40stEaP%7dlBdK%7dqAqD%7dwAqYcxBbV%7d%7bHqZ_cB%7cKytB~Ras%40wfCezBb%40a%60C%7dk%40uWaM~Y%29/auto/600x600@2x.png?access_token=pk.eyJ1IjoiZGFuc3dpY2siLCJhIjoieUZiWmwtVSJ9.0cPQywdbPVmvHiHJ6NwdXA)), you get the following:\n\n![image](https://cloud.githubusercontent.com/assets/2365503/16859058/9c908d9c-49e0-11e6-87be-5cd2121eaeb7.png)\n\nWhich resembles the original geometry, but with a couple of wrong turns. @yhahn noted that this could have something to do with escaped backslashes being removed from the encoded polyline. He also noted that directions v5 encodes polylines with a lower precision than directions v4, which is likely contributing to the issue. \n\ncc @colleenmcginnis \n"}}
{"actor":{"display_login":"jfirebaugh"}}