I have two layers in my GEE and I want to reset one of them base on my selector. I have the code as following:
Map.layers().reset(['UHI']);
Map.addLayer(UHIAdded, {opacity: 0.5}, 'layer1');
Map.addLayer(uhiday, {min: -2.0, max: 3.0, palette: palette, opacity: 0.5}, 'UHI');
And there's the error:
Cannot add an object of type string as a layer.
If I get rid of the []
, it will give me the error:
The argument provided to
ui.List.reset()
must be an array.
How do I specify the layer that I want to reset?