1
0
mirror of https://github.com/django/django.git synced 2024-12-22 09:05:43 +00:00

Fixed #33637 -- Improved initial zoom level in MapWidget.

This commit is contained in:
Claude Paroz 2022-04-14 11:50:31 +02:00 committed by GitHub
parent 5c67d906fd
commit 08f30d1b6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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());
}

View File

@ -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) {