Skip to content
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

update to mapbox-gl 0.29.0; add maxZoom as a prop #171

Merged
merged 2 commits into from
Jan 8, 2017
Merged

Conversation

abmai
Copy link
Contributor

@abmai abmai commented Jan 8, 2017

This includes modifying the startDragLngLat from an array to an object, which might be a breaking change if people have been using this variable other than just passing it back into the map instance. @ibgreen what do you think we should do here?

For context, it was changed to an object because the transform utilities in the new mapbox version expects an object that looks like {lng, lat} and not an array anymore.

@abmai abmai requested review from balthazar and ibgreen January 8, 2017 09:24
@ibgreen
Copy link
Contributor

ibgreen commented Jan 8, 2017

@ibgreen what do you think we should do here?

I think we should stay with lnglat array if possible.

While the startDragLngLat is rarely manipulated by the user, we have gone to a lot of effort standardizing on simple lnglat arrays in the rest of our web mapping stack (deck.gl, viewport-mercator-project etc). I felt that this standardization was important as it is confusing to deal with different representations of the same thing in an untyped programming language.

I think we should have a really good reason if we want to diverge from that pattern in our public API. Converting back and forth between an array and an object during event handling is cheap, and doing so would allow us to maintain a simple message: that we always use lnglat arrays for coordinates.

@abmai
Copy link
Contributor Author

abmai commented Jan 8, 2017

Thanks! I'll keep using the [lng, lat] as a convention then.

@ibgreen ibgreen merged commit 8dc905c into master Jan 8, 2017
@ibgreen ibgreen deleted the anh.dev branch January 8, 2017 23:15
cl0ckwork pushed a commit to cl0ckwork/react-map-gl that referenced this pull request Mar 10, 2018
* update to mapbox-gl 0.29.0; add maxZoom as a prop

* revert to array convention for startDragLntLat and convert to object where needed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants