What is the difference between adding an ImageLayer like this:
new ImageLayer({
map: map,
});
And this:
map.addLayer(imageLayer);
I'm asking because I can't remove the layer if I pass the map to the ImageLayer in the properties.
map.removeLayer(imageLayer);