I created a map using OpenLayers3. I can successfully scale to a layer on the map using the following code:
map.getView().fit(extent, map.getSize());
However, I looked like something similar in an animated way.
I know about the following animations:
ol.animation.pan
ol.animation.zoom
Using them, I cannot scale to level using ol.animation.pan. I can only pan to a point (and not limit) and use ol.animation.zoom. I can scale to resolution (and not to the bounding box). So I'm looking for animated .fit, so I can scale the animation to some extent.
Any suggestions on how I can achieve this would be appreciated :)
source
share