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

No Support for FeatureGroups #1

Open
Schlepptop opened this issue Sep 4, 2019 · 2 comments
Open

No Support for FeatureGroups #1

Schlepptop opened this issue Sep 4, 2019 · 2 comments

Comments

@Schlepptop
Copy link

When trying to add a Great Circle to a FeatureGroup instead of adding it directly to a map, I get this._map.getZoom is not a function. Looking at the addTo method, it becomes clear why that is, as the rendering method needs to get the zoom from the map to decide on how to render the circle, but my limited JS knowledge is insufficient to implement a proper fix.

@nuclearsecrecy
Copy link
Owner

I've never used FeatureGroups or LayerGroups so I am not sure at all how they work. As you've noticed this plugin assumes you have added it to a map — I think it would take a lot of retooling to make it addable to other things. Sorry.

@piranna
Copy link

piranna commented May 23, 2024

I found the same issue. We can get the map with the _map attribute so we can call getZoom() there, but I think maybe it would not be available if the LayerGroup is not added to a map... that makes sense to do nothing then because we don't have anywhere to paint the polygon. We would just need to detect then when the LayerGroup get added to a map.

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

3 participants