@@ -28,10 +28,10 @@ annotation_map_tile <- function(type = "osm", zoom = NULL, zoomin = -2,
28
28
29
29
if (is.null(data )) {
30
30
if (is.null(zoom )) {
31
- data <- data.frame (type = type , zoomin = zoomin )
31
+ data <- data.frame (type = type , zoomin = zoomin , stringsAsFactors = FALSE )
32
32
mapping <- ggplot2 :: aes(type = type , zoomin = zoomin )
33
33
} else {
34
- data <- data.frame (type = type , zoom = zoom , zoomin = zoomin )
34
+ data <- data.frame (type = type , zoom = zoom , zoomin = zoomin , stringsAsFactors = FALSE )
35
35
mapping <- ggplot2 :: aes(type = type , zoom = zoom , zoomin = zoomin )
36
36
}
37
37
}
@@ -116,7 +116,7 @@ GeomMapTile <- ggplot2::ggproto(
116
116
x = sp_bbox ,
117
117
zoomin = data [[" zoomin" ]][1 ],
118
118
zoom = data [[" zoom" ]][1 ],
119
- type = data [[" type" ]][1 ],
119
+ type = as.character( data [[" type" ]][1 ]) ,
120
120
forcedownload = forcedownload ,
121
121
cachedir = cachedir ,
122
122
progress = progress ,
@@ -139,7 +139,7 @@ GeomMapTile <- ggplot2::ggproto(
139
139
x = sp_bbox ,
140
140
zoomin = data [[" zoomin" ]][1 ],
141
141
zoom = data [[" zoom" ]][1 ],
142
- type = data [[" type" ]][1 ],
142
+ type = as.character( data [[" type" ]][1 ]) ,
143
143
forcedownload = forcedownload ,
144
144
cachedir = cachedir ,
145
145
progress = progress ,
0 commit comments