diff --git a/django/contrib/gis/static/gis/js/OLMapWidget.js b/django/contrib/gis/static/gis/js/OLMapWidget.js index 2395e4d7dd..69dfa71a5b 100644 --- a/django/contrib/gis/static/gis/js/OLMapWidget.js +++ b/django/contrib/gis/static/gis/js/OLMapWidget.js @@ -99,7 +99,7 @@ ol.inherits(GeometryTypeControl, ol.control.Control); ol.extent.extend(extent, feature.getGeometry().getExtent()); }, this); // Center/zoom the map - this.map.getView().fit(extent, {maxZoom: this.options.default_zoom}); + this.map.getView().fit(extent, {minResolution: 1}); } else { this.map.getView().setCenter(this.defaultCenter()); } diff --git a/js_tests/gis/mapwidget.test.js b/js_tests/gis/mapwidget.test.js index 80ed17b9d0..8991738c6c 100644 --- a/js_tests/gis/mapwidget.test.js +++ b/js_tests/gis/mapwidget.test.js @@ -33,7 +33,7 @@ QUnit.test('MapWidget.defaultCenter', function(assert) { '6.81,47.08', 'Default center at 6.81, 47.08' ); - assert.equal(widget.map.getView().getZoom(), 12); + assert.equal(widget.map.getView().getZoom(), 17); }); QUnit.test('MapWidget.interactions', function(assert) {