0

While importing a Shp file in Earth Engine, I want to control or change opacity/transparency of the layer. I have gone through almost all read me files, I find nothing.

This doesn't work:

Map.addLayer (ind_shp, {opacity: 0.5}, 'map');
2

It works like this:

var shown = true; // true or false, 1 or 0 
var opacity = 0.5; // number [0-1]
var nameLayer = 'map'; // string
var visParams = {color: 'red'}; // dictionary: 
Map.addLayer(ind_shp, visParams, nameLayer, shown, opacity);

Note: For Features and FeatureCollections, the only supported key is "color"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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