The setLayers() method now accepts a callback function as a second argument