久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

      <tfoot id='C1ORx'></tfoot>

      <legend id='C1ORx'><style id='C1ORx'><dir id='C1ORx'><q id='C1ORx'></q></dir></style></legend>
        <i id='C1ORx'><tr id='C1ORx'><dt id='C1ORx'><q id='C1ORx'><span id='C1ORx'><b id='C1ORx'><form id='C1ORx'><ins id='C1ORx'></ins><ul id='C1ORx'></ul><sub id='C1ORx'></sub></form><legend id='C1ORx'></legend><bdo id='C1ORx'><pre id='C1ORx'><center id='C1ORx'></center></pre></bdo></b><th id='C1ORx'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='C1ORx'><tfoot id='C1ORx'></tfoot><dl id='C1ORx'><fieldset id='C1ORx'></fieldset></dl></div>

        <small id='C1ORx'></small><noframes id='C1ORx'>

          <bdo id='C1ORx'></bdo><ul id='C1ORx'></ul>

        R 的傳單:如何更改默認 CSS 集群類

        Leaflet for R: How to change default CSS cluster classes(R 的傳單:如何更改默認 CSS 集群類)

          • <bdo id='5rIfL'></bdo><ul id='5rIfL'></ul>
              1. <i id='5rIfL'><tr id='5rIfL'><dt id='5rIfL'><q id='5rIfL'><span id='5rIfL'><b id='5rIfL'><form id='5rIfL'><ins id='5rIfL'></ins><ul id='5rIfL'></ul><sub id='5rIfL'></sub></form><legend id='5rIfL'></legend><bdo id='5rIfL'><pre id='5rIfL'><center id='5rIfL'></center></pre></bdo></b><th id='5rIfL'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='5rIfL'><tfoot id='5rIfL'></tfoot><dl id='5rIfL'><fieldset id='5rIfL'></fieldset></dl></div>
                  <tfoot id='5rIfL'></tfoot>
                    <tbody id='5rIfL'></tbody>
                  <legend id='5rIfL'><style id='5rIfL'><dir id='5rIfL'><q id='5rIfL'></q></dir></style></legend>

                  <small id='5rIfL'></small><noframes id='5rIfL'>

                • 本文介紹了R 的傳單:如何更改默認 CSS 集群類的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  如何從 Leaflet for R 界面更改定義集群對象的默認 CSS 類?例如,如果我想從 .marker-cluster-small 類中移除不透明度,我如何在 R 中做到這一點?

                  How do I change the default CSS classes which define cluster objects from within the Leaflet for R interface? For example, if I wanted to remove the opacity from the .marker-cluster-small class, how could I do this from within R?

                  這里是創建集群類的 CSS:https://github.com/Leaflet/Leaflet.markercluster/blob/64a2d5711521e56cac8ab863fb658beda5690600/dist/leaflet.markercluster-src.js

                  Here is the CSS which creates the cluster classes: https://github.com/Leaflet/Leaflet.markercluster/blob/64a2d5711521e56cac8ab863fb658beda5690600/dist/leaflet.markercluster-src.js

                  例如,我想從集群中移除不透明度,例如

                  For example, I want to remove the opacity from the clusters, e.g.

                  .marker-cluster-small {
                      background-color: rgba(181, 226, 140, 1.0);
                      }
                  .marker-cluster-small div {
                      background-color: rgba(110, 204, 57, 1.0);
                      }
                  

                  有沒有辦法在 iconCreateFunction 中做到這一點?

                  Is there a way to do this from within iconCreateFunction ?

                  library(leaflet)
                  leaflet(quakes) %>% addTiles() %>% addMarkers(
                    clusterOptions = markerClusterOptions(iconCreateFunction=JS("function (cluster) {    
                      var childCount = cluster.getChildCount(); 
                      var c = ' marker-cluster-';  
                      if (childCount < 100) {  
                        c += 'large';  
                      } else if (childCount < 1000) {  
                        c += 'medium';  
                      } else { 
                        c += 'small';  
                      }    
                      return new L.DivIcon({ html: '<div><span>' + childCount + '</span></div>', className: 'marker-cluster' + c, iconSize: new L.Point(40, 40) });
                  
                    }"))
                  )
                  

                  推薦答案

                  您可以嘗試將內聯 CSS 添加到創建圖標的函數中的不同標記,例如:

                  You can maybe try to add inline CSS to the different markers in the function that creates the icons, for ex:

                  clusterOptions = markerClusterOptions(iconCreateFunction=JS("function (cluster) {    
                      var childCount = cluster.getChildCount();  
                      if (childCount < 100) {  
                        c = 'rgba(181, 226, 140, 1.0);'
                      } else if (childCount < 1000) {  
                        c = 'rgba(240, 194, 12, 1);'  
                      } else { 
                        c = 'rgba(241, 128, 23, 1);'  
                      }    
                      return new L.DivIcon({ html: '<div style="background-color:'+c+'"><span>' + childCount + '</span></div>', className: 'marker-cluster', iconSize: new L.Point(40, 40) });
                  
                    }")
                  

                  如果你使用 shiny,你也可以改變 iconCreateFunction 為每個標記分配不同的類,并添加 tags$style在標題中設置這些類的 CSS.這是一個例子:

                  If you are using shiny, you can also change the iconCreateFunction to assign a different class to each marker, and add tags$style in the header to set the CSS for these classes. Here's an example:

                  ui <- fluidPage(
                    tags$head(tags$style(HTML("
                    .marker-custom-small {
                    background-color: rgba(181, 226, 140, 1);
                      }
                  .marker-customr-small div {
                      background-color: rgba(110, 204, 57, 1);
                      }
                  
                  .marker-custom-medium {
                      background-color: rgba(241, 211, 87, 1);
                      }
                  .marker-custom-medium div {
                      background-color: rgba(240, 194, 12, 1);
                      }
                  
                  .marker-custom-large {
                      background-color: rgba(253, 156, 115, 1);
                      }
                  .marker-custom-large div {
                      background-color: rgba(241, 128, 23, 1);
                      }"))),
                    leafletOutput("mymap"))
                  
                  server<-function(input, output, session) {
                    output$mymap <- renderLeaflet({
                      leaflet(quakes) %>% addTiles() %>% addMarkers(
                        clusterOptions = markerClusterOptions(iconCreateFunction=JS("function (cluster) {    
                      var childCount = cluster.getChildCount(); 
                      var c = ' marker-custom-';  
                      if (childCount < 100) {  
                        c += 'large';  
                      } else if (childCount < 1000) {  
                        c += 'medium';  
                      } else { 
                        c += 'small';  
                      }    
                      return new L.DivIcon({ html: '<div><span>' + childCount + '</span></div>', className: 'marker-cluster' + c, iconSize: new L.Point(40, 40) });
                  
                    }"))
                      )
                    })
                  }
                  
                  shinyApp(ui,server)
                  

                  無法弄清楚如何在 shiny 應用程序之外的 leaflet 中使用自定義 CSS.

                  Couldn't figure out how to have custom CSS in the leaflet outside of a shiny app.

                  這篇關于R 的傳單:如何更改默認 CSS 集群類的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Browserify, Babel 6, Gulp - Unexpected token on spread operator(Browserify,Babel 6,Gulp - 傳播運算符上的意外令牌)
                  Is it possible to pass a flag to Gulp to have it run tasks in different ways?(是否可以將標志傳遞給 Gulp 以使其以不同的方式運行任務?)
                  Why do we need to install gulp globally and locally?(為什么我們需要在全局和本地安裝 gulp?)
                  How to run Gulp tasks sequentially one after the other(如何一個接一個地依次運行 Gulp 任務)
                  Stylesheet not loaded because of MIME-type(由于 MIME 類型而未加載樣式表)
                  Visual Studio 2015 crashes when opening Javascript files(打開 Javascript 文件時 Visual Studio 2015 崩潰)

                  <tfoot id='z3AyD'></tfoot>

                    <bdo id='z3AyD'></bdo><ul id='z3AyD'></ul>

                      <small id='z3AyD'></small><noframes id='z3AyD'>

                          <i id='z3AyD'><tr id='z3AyD'><dt id='z3AyD'><q id='z3AyD'><span id='z3AyD'><b id='z3AyD'><form id='z3AyD'><ins id='z3AyD'></ins><ul id='z3AyD'></ul><sub id='z3AyD'></sub></form><legend id='z3AyD'></legend><bdo id='z3AyD'><pre id='z3AyD'><center id='z3AyD'></center></pre></bdo></b><th id='z3AyD'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='z3AyD'><tfoot id='z3AyD'></tfoot><dl id='z3AyD'><fieldset id='z3AyD'></fieldset></dl></div>
                              <tbody id='z3AyD'></tbody>
                            <legend id='z3AyD'><style id='z3AyD'><dir id='z3AyD'><q id='z3AyD'></q></dir></style></legend>
                          1. 主站蜘蛛池模板: 亚洲色图图片 | 亚洲精品自在在线观看 | 国产成人自拍一区 | 久久综合一区二区三区 | 在线观看黄色电影 | 国产美女在线观看 | 精产国产伦理一二三区 | 黄色大片在线 | 天天躁日日躁狠狠躁2018小说 | 精品99久久久久久 | 久久精品视频9 | 国产精品精品视频 | 操人网| 欧美日韩中文字幕在线 | 91国内产香蕉 | 二区亚洲| 国精产品一品二品国精在线观看 | 久久精品国产99国产 | 黄网站免费在线观看 | 小早川怜子xxxxaⅴ在线 | 亚洲午夜精品视频 | 久久久九九九九 | 99精品欧美一区二区三区综合在线 | 天堂一区在线观看 | 欧美一级片 | 日本三级网站在线观看 | 一区二区不卡 | 成人久久久 | 欧美jizzhd精品欧美巨大免费 | 视频1区2区 | 99热视| 五十女人一级毛片 | 日韩一区二区久久 | 欧美偷偷操 | 久久综合一区二区三区 | 午夜精品在线观看 | 91精品综合久久久久久五月天 | 国产精品久久久久久久久久久免费看 | 日本一区二区高清不卡 | 色婷婷亚洲国产女人的天堂 | 亚洲视频一区在线 |