Broken:  error layer.getVisibility

is not a function... but getVisibility is a method of the layer.  not
sure what the issue is.