Use ol.extent.getWidth and ol.extent.getHeight

Use the `ol.extent.getWidth` and `ol.extent.getHeight` functions.