I have cluster with some features inside, and when clicking to cluster, I need to zoom to those features inside. I did everything like described in this post in answers Continue zooming in when smaller clusters are tapped and when clicking to cluster I receive the following view.
Here we can see that features fits the extent, but visually it is not very good: some of features(actually feature icon) are cutted off. I tried to add some padding to fit function like map.getView().fit(extent, { padding: [20, 20, 20, 20] });
. But another problem has arised:
Not all features are zoomed in, but I want see all features opened. I also tried constrainResolution to false, but no luck. How that can be fixed, any tips are welcomed, as I am running out of ideas.