I have some code to recorder layers. Code below is the function that does the reorder. Unfortunately, this is not working in 4.19, any ideas what I am doing wrong. The order of the layers changes but does not render on the map.
Map.allLayers returns collection of ALL layers including basemap and ground layers. Do you mean to re-order absolutely all layers in your map? If you are re-ordering layers using this collection, your operational layers maybe being moved underneath the basemap layers. Map.layers will give you collection of operational layers (the layers drawn on top of basemap and ground layers).