mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	Fixed #33637 -- Improved initial zoom level in MapWidget.
This commit is contained in:
		| @@ -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()); | ||||
|         } | ||||
|   | ||||
| @@ -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) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user