Sets the visibility for the specified layer name, for all layer types: Polyline, Polygon and Marker. |
Parameters:
layerName
(string): The name of the layer to update
visible
(boolean): If true
, then show the layer; if false
, then hide the layer
Returns: Nothing
Throws: Error in the console if a layer is not found with a name
that matches layerName
.