久久久久久久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. 主站蜘蛛池模板: 伊人春色成人网 | 亚洲一区视频在线 | 午夜亚洲 | 亚洲精品一区二区二区 | 欧美在线看片 | 精品国产99 | 在线观看av网站永久 | 天天插天天操 | 欧美成人视屏 | 久久99精品久久久久子伦 | 青青久久av北条麻妃海外网 | 国产成人精品一区二区三区视频 | 欧美理伦片在线播放 | 成人深夜福利在线观看 | 91免费观看国产 | 超碰免费在 | 麻豆精品国产91久久久久久 | 日本天堂一区 | 凹凸日日摸日日碰夜夜 | 国产高清视频在线 | 久久精品一区二区三区四区 | 一级毛片中国 | 国产日韩一区 | 视频一区在线 | 亚洲精品一区二三区不卡 | 久久国产香蕉 | 成人在线视频免费观看 | 亚洲精品永久免费 | 国产乱精品一区二区三区 | 福利视频一区二区 | 一本大道久久a久久精二百 欧洲一区二区三区 | 国产精品一码二码三码在线 | 久久成人一区 | 精品日韩在线 | 日韩中文字幕一区 | 香蕉视频91| 一区二区三区影院 | 日韩欧美成人一区二区三区 | 久久精品国产一区老色匹 | www成人免费 | 久热久热 |