There are already methods for Raster* objects. This adds methods for
SpatialPoints*, SpatialLines*, and SpatialPolygons*,
returning an empty character vector of length 1.
This function was created to give consistent, meaningful results for all
classes of objects plotted by Plot.
layerNames(object)# S4 method for list
layerNames(object)
# S4 method for ANY
layerNames(object)
# S4 method for Raster
layerNames(object)
# S4 method for .spadesPlot
layerNames(object)
# S4 method for igraph
layerNames(object)
A Raster*, SpatialPoints*, SpatialLines*,
or SpatialPolygons* object; or list of these.