When the resize event on the map portal, delay calling the legend
resize function by 500 ms