-
Notifications
You must be signed in to change notification settings - Fork 27
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
Calling getBounds on a GeodesicCircle throws an error #48
Comments
I agree. This, and maybe other methods, need to be included in the geodesic-classes. |
Yeah there may be more missing methods but that's as far as I went with it. I noticed |
Related code in leaflet.js: https://github.com/Leaflet/Leaflet/blob/441c5fb0a877ada5d055f0d5f1fa1db8ce7c2957/src/layer/FeatureGroup.js#L84 |
implement getBounds(), fixes #48
Release is v2.3.1 |
Thanks! |
I have a FeatureGroup that can contain a number of Rectangles, Circles, or GeodesicCircles. On page load I call
map.fitResults(featureGroup.getBounds())
to zoom in and fit the view of the map to nicely contain all of the geoshapes. It looks like callinggetBounds()
on a FeatureGroup internally callsgetBounds()
on each of the underlying layers, but GeodesicCircle doesn't have that method and an error gets thrown when that layer is reached.Polylines however do have the
getBounds()
method and I was able to temporarily resolve this issue by defining a new method on each instance of a GeodesicCircle:The text was updated successfully, but these errors were encountered: