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

Docs: Add types to use control example #2109

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Conversation

tordans
Copy link
Contributor

@tordans tordans commented Jan 24, 2023

The page https://github.com/visgl/react-map-gl/blob/master/docs/api-reference/use-control.md?plain=1#L9 / http://visgl.github.io/react-map-gl/docs/api-reference/use-control uses the Types DrawControlProps which are not specified in the example / on the page.

They are specified on this page https://github.com/visgl/react-map-gl/blob/master/examples/draw-polygon/src/draw-control.ts#L6-L12 , however.

This PR add them to the example.


Update: Looking at https://github.com/visgl/react-map-gl/blob/master/examples/draw-polygon/src/app.tsx more, I am now pretty sure this PR is not correct. Will mark it as draft, first. Maybe someone can look into it in more detail…

@tordans tordans marked this pull request as draft January 24, 2023 14:12
@tordans
Copy link
Contributor Author

tordans commented Sep 4, 2023

FYI, we have very similar types in use at https://github.com/FixMyBerlin/atlas-app/blob/develop/src/components/MapInterface/Map/Calculator/CalculatorControlsDrawControl.tsx#L10-L17 so this PR might be right after all…

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