Google Earth Engine – Implementing CSS Transparency for Vector and Symbology

colorgoogle-earth-enginesymbologyvector

I have imported a very simple shapefile to my map in GEE. Since this layer represents boundaries (see picture below), I am trying to find a way for the outline colour to be solid black whilst rendering the fill colour transparent instead of white. Is there a way to do this? I don't want to make the whole layer transparent.

My code is very basic but is as follows:

var symbology = {color: 'black', fillColor: 'white'};
Map.addLayer(table2.style(symbology));

enter image description here

Best Answer

Where Earth Engine accepts a color name or hex code, you can use an eight-digit hex code where the last two digits are the alpha (opacity) value.

var symbology = {color: 'black', fillColor: '#FFFFFF77'};