I'm trying to dynamically update the extent of a 500px x 400px map such that the view contains all of Corsica and Sardinia (an artificial example). (See codepen https://codepen.io/tonygraham/pen/eYKYLqX).
However, the resulting view clips the region that I expected to see, and neither Corsica nor Sardinia "fits".
Am I missing some subtlety with scale or zoom? Should I be setting those as well?
My real use case is that I have some projected data already graphed that I want to display above the map at an exact extent, but I think I'm lacking the control I need over the extent to do it.