Feature and FeatureCollection Visualization

As with images, geometries and features, feature collections can be added to the map
directly with Map.addLayer(). The default visualization will display the
vectors with solid black lines and semi-opaque black fill. To render the vectors in color,
specify the color parameter. The following displays the ‘Global 200’ ecoregions
(Olson
et al. 1998) as the default visualization and in red:

For additional display options, use featureCollection.draw(). Specifically,
parameters pointRadius and strokeWidth control the size of points
and lines, respectively, in the rendered FeatureCollection:

The output of draw() is an image with red, green and blue bands set according
to the specified color parameter.

For more control over how a FeatureCollection is displayed, use
image.paint() with the FeatureCollection as an argument. Unlike
draw(), which outputs a three-band, 8-bit display image,
image.paint() outputs an image with the specified numeric value ‘painted’
into it. Alternatively, you can supply the name of a property in the
FeatureCollection which contains the numbers to paint. The width
parameter behaves the same way: it can be a constant or the name of a property with a
number for the line width. For example:

Note that the empty image into which you paint the features needs to be cast prior to
painting. This is because a constant image behaves as a constant: it is clamped to the
initialization value. To color the feature edges with values set from a property of the
features, set the color parameter to the name of the property with numeric values: