-
Notifications
You must be signed in to change notification settings - Fork 113
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
PolylineDecorator.getBounds() throws error #74
Comments
Hi, and sorry for waiting so long to answer. You're right about the bug and what's causing it. The lack of a Anyways, to fix the problem on PolylineDecorator, I think the simplest way is to use |
I don't think simply using The exact bounds - including the symbols - depend on the zoom level, because the symbol size is in screen space (at least in my use-cases). |
Oh yes, you're right, I underestimated things. I think your solution of using the path bounds is the right compromise. Would you like to make a PR like you proposed? It could be merged quickly. |
I had some time so I added it myself. It should be fixed in version 1.6.0. Thanks for your help! |
Same issue with |
I've run into an issue when trying to find the bounds of a
PolylineDecorator
.Since
PolylineDecorator
is aFeatureGroup
, it hasgetBounds
method.That method will try to iterate all of its layers and call
getBounds
orgetLatLng
on those.But because the child layers are instances of
LayerGroup
, they do not have either method, and so aTypeError: e.getLatLng is not a function
error is thrown.Since the 1.3.0 release the bounds of the child layers would not even be the real bounds of a
PolylineDecorator
- the closest we could get now is the bound of its paths.These changes work for my use-case, I could make a PR of them, if it would get merged:
The text was updated successfully, but these errors were encountered: