Open carpiediem opened 7 years ago
This is already done at https://github.com/IvanSanchez/Leaflet.ImageOverlay.Rotated/blob/gh-pages/Leaflet.ImageOverlay.Rotated.js#L129 .
Can you publish a fiddle/codepen/playground that displays this behaviour? That should make it easier to see where the FeatureGroup
needs the _bounds
, and how to refactor the bounds-calculating code so it can run earlier.
I tried to include some Leaflet.ImageOverlay.Rotated layers in a feature group, but the L.FeatureGroup methods weren't working correctly. It appears this is due to not getting bounding data from the Leaflet.ImageOverlay.Rotated object.
I was able to make a temporary solution by adding the second line of code, below.
Perhaps the library could do this automatically?