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

Export MapContext to support custom controls #654

Closed
daniel-hauser opened this issue Nov 8, 2018 · 1 comment
Closed

Export MapContext to support custom controls #654

daniel-hauser opened this issue Nov 8, 2018 · 1 comment

Comments

@daniel-hauser
Copy link
Contributor

daniel-hauser commented Nov 8, 2018

Using the new context API added in #619, the only way for a custom component to get the mapbox map instance is to get the Map ref, then extract the map from the state.

Using MapContext.Consumer (or alternatively, withMap) will make the code of custom controllers better.

@mklopets
Copy link
Collaborator

Released this in v4.4.0

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

No branches or pull requests

2 participants