Skip to content

Don't export LayerSf #3158

Closed
Closed
@clauswilke

Description

@clauswilke

When I implemented custom layers for sf objects, I exported the relevant layer object, LayerSf():

ggplot2/R/layer-sf.R

Lines 3 to 8 in 033fb52

#' @export
#' @include layer.r
#' @rdname ggsf
#' @usage NULL
#' @format NULL
LayerSf <- ggproto("LayerSf", Layer,

This is bad, because we currently don't export its parent, Layer(), and we don't want to export it at this time.

The correct way to make the sf-specific layer available is to add a constructor function, layer_sf(), which replaces the layer() function for sf layers.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions