diff --git a/R/demoMap.R b/R/demoMap.R index 4a90669..5b3c16a 100644 --- a/R/demoMap.R +++ b/R/demoMap.R @@ -11,7 +11,7 @@ ##' @examples ##' demomap("china") ##' @export -demomap = function(mapName){ +demomap = function(mapName, opacity=0.2){ # if(.Platform$OS.type == "windows"){ # locate = Sys.getlocale("LC_CTYPE") # Sys.setlocale("LC_CTYPE","eng") @@ -30,8 +30,10 @@ demomap = function(mapName){ output = map %>% leaflet::addTiles() %>% leaflet::addPolygons(stroke = T, smoothFactor = 0.2, - fillOpacity = 0.2, - # fillColor = ~color, + fillOpacity = opacity, + fillColor = 'grey', + color = 'white', + opacity = 1, weight = 1, popup = ~htmltools::htmlEscape(popup)) # diff --git a/man/demomap.Rd b/man/demomap.Rd index 2390519..b8b0d50 100644 --- a/man/demomap.Rd +++ b/man/demomap.Rd @@ -8,6 +8,7 @@ demomap (mapName) } \arguments{ \item{mapName}{mapName for loading, eg. 'china', 'city', ...} +\item{opacity}{opacity for polygons} } \description{ This function create a leaflet map from a name of the mapType like china, city