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

Add SVGOverlay component #630

Merged
merged 1 commit into from
Oct 17, 2019
Merged

Conversation

fenech
Copy link
Contributor

@fenech fenech commented Oct 16, 2019

Mentioned in #624, this component exists in Leaflet but has no analogue in this library.

A lot of code is duplicated with MapLayer - the reason for this is to give the component access to the SVG element that it creates (this.container). An alternative could be to create the DOM element in the constructor and call super({ ...props, container }).

Added docs and example.

@PaulLeCam
Copy link
Owner

Thanks!
I think creating the container in the createLeafletElement() method is a good way.
Could you please address the issues raised in CI so this can be merged?

@fenech
Copy link
Contributor Author

fenech commented Oct 17, 2019

@PaulLeCam updated to fix flow errors and amended the commit. I typed the container as Element because it looks like flow doesn't have proper types for SVG elements.

@PaulLeCam PaulLeCam merged commit 3c1d346 into PaulLeCam:master Oct 17, 2019
@PaulLeCam
Copy link
Owner

Thanks!

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.

None yet

2 participants