You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When attempting to save the result from the endcode flag, the outputted result is not the same as the outputted result from the GeoJSON node script. There is an issue with the parser of the input or output.
The array of [lat,lng] points is being passed into encode as a rawString. The proper fix would be to add JSON.parse() to what is passed to encode in the CLI wrapper file. Its unlikely that this fix would break other users. (requesting @ Mapbox team to review)
When attempting to save the result from the
endcode
flag, the outputted result is not the same as the outputted result from the GeoJSON node script. There is an issue with the parser of the input or output.Steps to reproduce:
[[-114.05130386352539,51.112359778280194],[-114.05130386352539,51.11947193091105],[-114.05611038208008,51.12324308281078][-114.06538009643555,51.126152046793365], [-114.0736198425293,51.12916855668462]]
cat polyline.json | ./bin/polyline.bin.js --encode > encoded-poly.txt
:result in
encoded-poly.txt
:"??????????_}hQ?????_qo]?~flW?_seK?~|hQ?_}hQ?_qo]?~reK?~|hQ?_seK?~|hQ?_}hQ?~reK?_{rc@?????~flW???????_ibE?_ibE?_seK?_glW?~reK???_ibE?~zrc@?_{rc@?~nyo@?_ibE?_oyo@?~po]?????????????????????????????????????_}hQ?????_qo]?~flW?_seK?~|hQ?_}hQ?_qo]?~reK?~|hQ?_seK?~|hQ?_}hQ?~reK?_{rc@?????~flW???????_oyo@?~po]?_}hQ?~zrc@?_oyo@?~zrc@?~|hQ?_y|u@?~nyo@???~hbE?_qo]?????????????????????????????????????_}hQ?????_qo]?_ibE?~po]???~hbE?_}hQ?_qo]?~zrc@?~reK?_oyo@?~nyo@???_oyo@?????~flW?????_ibE?_ibE?~hbE?_seK?~hbE?~|hQ?_oyo@?~zrc@?_{rc@?~dvi@?~hbE?_evi@?_ibE?????????????????????????????????????_}hQ?????_{rc@?~hbE?~reK?_qo]?~nyo@???_y|u@?~|hQ?~reK?~hbE?_seK?????????~flW?????_ibE?_glW?~po]?_glW?~|hQ?~reK?_glW?_seK?_ibE?_seK?~zrc@???_}hQ?~hbE?????????????????????????????????????_}hQ?????_evi@?~flW?_}hQ?~po]?_oyo@?~hbE?~flW?~reK?_}hQ?~|hQ?_evi@?~zrc@?????~flW?????_ibE?_evi@?~nyo@?_qo]?_seK?~|hQ???_ibE???_seK?~flW?_seK?~flW???????"
Compare to the result from the GeoJSON node script:
The text was updated successfully, but these errors were encountered: