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:
parent
5c67d906fd
commit
08f30d1b6a
@ -99,7 +99,7 @@ ol.inherits(GeometryTypeControl, ol.control.Control);
|
|||||||
ol.extent.extend(extent, feature.getGeometry().getExtent());
|
ol.extent.extend(extent, feature.getGeometry().getExtent());
|
||||||
}, this);
|
}, this);
|
||||||
// Center/zoom the map
|
// Center/zoom the map
|
||||||
this.map.getView().fit(extent, {maxZoom: this.options.default_zoom});
|
this.map.getView().fit(extent, {minResolution: 1});
|
||||||
} else {
|
} else {
|
||||||
this.map.getView().setCenter(this.defaultCenter());
|
this.map.getView().setCenter(this.defaultCenter());
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ QUnit.test('MapWidget.defaultCenter', function(assert) {
|
|||||||
'6.81,47.08',
|
'6.81,47.08',
|
||||||
'Default center at 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) {
|
QUnit.test('MapWidget.interactions', function(assert) {
|
||||||
|
Loading…
Reference in New Issue
Block a user