Skip to content

Commit 2838809

Browse files
authored
Merge pull request #13 from paleolimbot/development
fix #12
2 parents 049fc31 + 89dc67d commit 2838809

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

R/geom-osm.R

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ annotation_map_tile <- function(type = "osm", zoom = NULL, zoomin = -2,
2828

2929
if(is.null(data)) {
3030
if(is.null(zoom)) {
31-
data <- data.frame(type = type, zoomin = zoomin)
31+
data <- data.frame(type = type, zoomin = zoomin, stringsAsFactors = FALSE)
3232
mapping <- ggplot2::aes(type = type, zoomin = zoomin)
3333
} else {
34-
data <- data.frame(type = type, zoom = zoom, zoomin = zoomin)
34+
data <- data.frame(type = type, zoom = zoom, zoomin = zoomin, stringsAsFactors = FALSE)
3535
mapping <- ggplot2::aes(type = type, zoom = zoom, zoomin = zoomin)
3636
}
3737
}
@@ -116,7 +116,7 @@ GeomMapTile <- ggplot2::ggproto(
116116
x = sp_bbox,
117117
zoomin = data[["zoomin"]][1],
118118
zoom = data[["zoom"]][1],
119-
type = data[["type"]][1],
119+
type = as.character(data[["type"]][1]),
120120
forcedownload = forcedownload,
121121
cachedir = cachedir,
122122
progress = progress,
@@ -139,7 +139,7 @@ GeomMapTile <- ggplot2::ggproto(
139139
x = sp_bbox,
140140
zoomin = data[["zoomin"]][1],
141141
zoom = data[["zoom"]][1],
142-
type = data[["type"]][1],
142+
type = as.character(data[["type"]][1]),
143143
forcedownload = forcedownload,
144144
cachedir = cachedir,
145145
progress = progress,

0 commit comments

Comments
 (0)