mapedit更改颜色和不透明度

时间:2018-09-26 00:12:30

标签: r shiny shinyjs sf r-leaflet

我有一个简单的应用程序,允许用户绘制特征。 我还应该如何允许用户通过提供十六进制代码来选择填充颜色和不透明度。

可复制的示例:

library(mapedit)
library(mapview)
library(shiny)
library(colourpicker)

ui <- fluidPage(
  fluidRow(
    editModUI("editor"),
    colourInput('colour', "Select Colour", allowTransparent = TRUE)
  )
)
server <- function(input, output, session) {

  edits <- callModule(editMod, "editor", mapview()@map)

  ### need to somehow adjust the color and/or opacity of the drawn features based on input$colour

}
shinyApp(ui, server)

0 个答案:

没有答案
相关问题