Replace fitGeometry and fitExtent with fit
Fit accepts either a geometry or an extent. This combines two previously distinct functions into one more flexible call. Also brings the rotations support and options previously available to fitGeometry to extents
This commit is contained in:
committed by
Bart van den Eijnden
parent
3021d3a6a7
commit
74759142d9
@@ -122,7 +122,7 @@ dragAndDropInteraction.on('addfeatures', function(event) {
|
||||
style: styleFunction
|
||||
})
|
||||
}));
|
||||
map.getView().fitExtent(
|
||||
map.getView().fit(
|
||||
vectorSource.getExtent(), /** @type {ol.Size} */ (map.getSize()));
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user