Adds a given EE object to the map as a layer.

Returns the new map layer.

Map.addLayer(eeObject, visParams, name, shown, opacity)ui.Map.Layer

The object to add to the map.

visParamsFeatureVisualizationParameters|ImageVisualizationParameters, optional

The visualization parameters. For Images and ImageCollection, see for valid parameters. For Features and FeatureCollections, the only supported key is "color", as a CSS 3.0 color string or a hex string in "RRGGBB" format.

nameString, optional

The name of the layer. Defaults to "Layer N".

shownBoolean, optional

A flag indicating whether the layer should be on by default.

opacityNumber, optional

The layer's opacity represented as a number between 0 and 1. Defaults to 1.