Remove the requirement to provide a size to ol.View#fit()

This commit is contained in:
Andreas Hocevar
2016-12-16 11:03:54 +01:00
parent 40afb9d40d
commit 20155ce2a7
14 changed files with 72 additions and 48 deletions

View File

@@ -118,8 +118,7 @@ dragAndDropInteraction.on('addfeatures', function(event) {
source: vectorSource,
style: styleFunction
}));
map.getView().fit(
vectorSource.getExtent(), /** @type {ol.Size} */ (map.getSize()));
map.getView().fit(vectorSource.getExtent());
});
var displayFeatureInfo = function(pixel) {