Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

The coordinate order should be inverted #262

Closed
Taxuspt opened this issue Oct 2, 2018 · 2 comments
Closed

The coordinate order should be inverted #262

Taxuspt opened this issue Oct 2, 2018 · 2 comments
Assignees
Labels
Milestone

Comments

@Taxuspt
Copy link

Taxuspt commented Oct 2, 2018

'coordinates': polyline.decode(route['geometry'])}

polyline.decode returns a list of (latitude, longitude) pairs, however the geojson format uses (longitude, latitude).

Thus calling service.directions() without explicitly set geometries to geojson will return a wrongly formatted geojson.

@Taxuspt
Copy link
Author

Taxuspt commented Oct 2, 2018

Line 263 should be:
'coordinates': [(lng, lat) for lat, lng in polyline.decode(route['geometry'])]}

@sgillies sgillies added the bug label Oct 2, 2018
@sgillies sgillies self-assigned this Oct 2, 2018
@sgillies sgillies added this to the 0.17.2 milestone Oct 2, 2018
@sgillies sgillies mentioned this issue Oct 2, 2018
@sgillies
Copy link
Contributor

sgillies commented Oct 2, 2018

Also noted in #250, which was closed before I saw it. Thanks for the report, @Taxuspt !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants