Docs: Add types to use control example #2109
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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…