Skip to content

Commit 8a3402c

Browse files
committed
replace special characters with _ in homebutton.css file creation
1 parent 4b9b5b6 commit 8a3402c

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
#### 🐛 bug fixes
66

7+
* use layerId instead of group for fgb files. Adresses https://github.com/r-spatial/mapview/issues/505
8+
79
#### 💬 documentation etc
810

911
#### 🍬 miscellaneous

R/homebutton.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,9 @@ addHomeButton <- function(map, ext, group = "layer",
118118

119119
path_layer = tempfile()
120120
dir.create(path_layer)
121-
path_layer = paste0(path_layer, "/", group, "_home-button.css")
121+
path_layer = paste0(
122+
path_layer, "/", gsub("[[:punct:] ]", "_", group), "_home-button.css"
123+
)
122124
writeLines(css_txt, path_layer)
123125

124126

0 commit comments

Comments
 (0)