-
Notifications
You must be signed in to change notification settings - Fork 102
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
make a breaking change to swap to lon/lat order #74
Comments
The current order is to match the polyline spec I believe, but it's maddening because there's not much consistency between libraries/tools doing polyline encoding/decoding. I wonder if an argument to flip coordinates would help too, so that you can decode polylines encoded with tools that use lon/lat (or lat/lon if the default here becomes lon/lat)? |
looking at https://github.com/mapbox/polyline#example , alternatively, you could add a parameter to each function like |
I should have been clearer, yes I'm only proposing to change the coordinates you pass encode and the coordinates you receive from decode, and not changing the resulting/supplied polyline encoding format. I think the argument/option to specify order is not needed. Most tools now use lon,lat order so if we follow that convention here it keeps things simpler. Having an option and keeping the default for backwards compatibility is not worth it in my opinion. |
"Most tools" really depends on the ecosystem you're in. Another option would be to deprecate/remove the encode/decode functions, and make everyone use the unambiguous |
True. I'm mostly referring to Turf and GL JS here. |
For consistency with GeoJSON, GL JS we should bump the major version number and swap to lon/lat order.
The text was updated successfully, but these errors were encountered: