Add maxZoom to ol.View.fitGeometry() options

This commit is contained in:
tsauerwein
2014-07-11 16:09:17 +02:00
parent b8c39bd62c
commit 3b8e182856
3 changed files with 30 additions and 2 deletions

View File

@@ -401,6 +401,19 @@ describe('ol.View', function() {
expect(view.getCenter()[0]).to.be(5900);
expect(view.getCenter()[1]).to.be(46100);
view.fitGeometry(
new ol.geom.Point([6000, 46000]),
[200, 200],
{
padding: [100, 0, 0, 100],
maxZoom: 6
}
);
expect(view.getResolution()).to.be(2);
expect(view.getZoom()).to.be(6);
expect(view.getCenter()[0]).to.be(5900);
expect(view.getCenter()[1]).to.be(46100);
view.setRotation(Math.PI / 4);
view.fitGeometry(
new ol.geom.LineString([[6000, 46000], [6000, 47100], [7000, 46000]]),