I am trying to run the expression below in Google Earth Engine to calculate Index-base Built-up Index(IBI)

var ibi = l8compositeMasked.expression(

Map.addLayer(ibi, {min:-1, max:1}, 'ibi', false); 

but I keep getting the error below.

Layer shown property is not a boolean: ee.Image({
  "type": "Invocation",
  "arguments": {

Below is the link to the script https://code.earthengine.google.com/bdb6397411fe912861900cba04bb9172

How can I resolve this?

2 Answers 2


The problem is in the last line of your script, not the line you have shown.

Map.addLayer(ibi,{min:-1 , max:1},'UI', ibi)

Here the fourth argument should be a boolean but is the image ibi.


Your last parameter in the Map.addLayer cal is the image again, not a name. This line:

Map.addLayer(ibi,{min:-1 , max:1},'UI', ibi)

should be:

Map.addLayer(ibi,{min:-1 , max:1},'UI', 'ibi')

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.