Sets the visibility for the specified layer name, for both polygon and marker layers.
Parameters:
layerName
(string): The name of the layer to updatevisible
(boolean): Iftrue
, then show the layer; iffalse
, then hide the layer
Returns: Nothing
Throws: Error in the console if a layer is not found with a name
that matches layerName
.