Is it possible to let the fitBounds function return a promise? I think it could be handy in some use cases. For example we want to make an image of a map using map.getCanvas().toDataURL(), but the image should only be taken as soon as we zoomed in to the features the map contains (using map.fitBounds()). The problem is that we can't find a way to let us know that the fitBounds action is completed. We tried using fitBounds.then(), but realised it doesn't return a promise.
Is it possible to let the fitBounds function return a promise? I think it could be handy in some use cases. For example we want to make an image of a map using map.getCanvas().toDataURL(), but the image should only be taken as soon as we zoomed in to the features the map contains (using map.fitBounds()). The problem is that we can't find a way to let us know that the fitBounds action is completed. We tried using fitBounds.then(), but realised it doesn't return a promise.