I am trying to create a MultiPolygon from an extent in OpenLayers 5
I'm getting the extent through map interaction of dragBox
let extent = selectBox.getGeometry().getExtent();
myService.select(extent);
select(extent){
let topLeft = extent.getTopLeft();
let topRight = extent.getTopRight();
let bottomLeft = extent.getBottomLeft();
let bottomRight = extent.getBottomRight();
};
The getters don't seem to be working, I get an error saying for example: "extent.getTopLeft is not a function"
Any help is appreciated