@@ -170,7 +170,7 @@ geom_sf <- function(mapping = aes(), data = NULL, stat = "sf",
170170 position = " identity" , na.rm = FALSE , show.legend = NA ,
171171 inherit.aes = TRUE , ... ) {
172172 c(
173- layer (
173+ layer_sf (
174174 geom = GeomSf ,
175175 data = data ,
176176 mapping = mapping ,
@@ -182,8 +182,7 @@ geom_sf <- function(mapping = aes(), data = NULL, stat = "sf",
182182 na.rm = na.rm ,
183183 legend = if (is.character(show.legend )) show.legend else " polygon" ,
184184 ...
185- ),
186- layer_class = LayerSf
185+ )
187186 ),
188187 coord_sf(default = TRUE )
189188 )
@@ -215,7 +214,7 @@ geom_sf_label <- function(mapping = aes(), data = NULL,
215214 position <- position_nudge(nudge_x , nudge_y )
216215 }
217216
218- layer (
217+ layer_sf (
219218 data = data ,
220219 mapping = mapping ,
221220 stat = stat ,
@@ -231,8 +230,7 @@ geom_sf_label <- function(mapping = aes(), data = NULL,
231230 na.rm = na.rm ,
232231 fun.geometry = fun.geometry ,
233232 ...
234- ),
235- layer_class = LayerSf
233+ )
236234 )
237235}
238236
@@ -260,7 +258,7 @@ geom_sf_text <- function(mapping = aes(), data = NULL,
260258 position <- position_nudge(nudge_x , nudge_y )
261259 }
262260
263- layer (
261+ layer_sf (
264262 data = data ,
265263 mapping = mapping ,
266264 stat = stat ,
@@ -274,8 +272,7 @@ geom_sf_text <- function(mapping = aes(), data = NULL,
274272 na.rm = na.rm ,
275273 fun.geometry = fun.geometry ,
276274 ...
277- ),
278- layer_class = LayerSf
275+ )
279276 )
280277}
281278
0 commit comments