Remove view.getView2D() method
This commit is contained in:
@@ -37,7 +37,7 @@ app.RotateNorthControl = function(opt_options) {
|
||||
var handleRotateNorth = function(e) {
|
||||
// prevent #rotate-north anchor from getting appended to the url
|
||||
e.preventDefault();
|
||||
this_.getMap().getView().getView2D().setRotation(0);
|
||||
this_.getMap().getView().setRotation(0);
|
||||
};
|
||||
|
||||
anchor.addEventListener('click', handleRotateNorth, false);
|
||||
|
||||
@@ -123,7 +123,7 @@ dragAndDropInteraction.on('addfeatures', function(event) {
|
||||
style: styleFunction
|
||||
})
|
||||
}));
|
||||
var view2D = map.getView().getView2D();
|
||||
var view2D = map.getView();
|
||||
view2D.fitExtent(
|
||||
vectorSource.getExtent(), /** @type {ol.Size} */ (map.getSize()));
|
||||
});
|
||||
|
||||
@@ -119,7 +119,7 @@ dragAndDropInteraction.on('addfeatures', function(event) {
|
||||
source: vectorSource,
|
||||
style: styleFunction
|
||||
}));
|
||||
var view2D = map.getView().getView2D();
|
||||
var view2D = map.getView();
|
||||
view2D.fitExtent(
|
||||
vectorSource.getExtent(), /** @type {ol.Size} */ (map.getSize()));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user