pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

      <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="vjzzt7p" 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 的傳單:如何更改默認(rèn) CSS 集群類

        Leaflet for R: How to change default CSS cluster classes(R 的傳單:如何更改默認(rèn) 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="vvbvzjt" 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 的傳單:如何更改默認(rèn) CSS 集群類的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

                  問(wèn)題描述

                  限時(shí)送ChatGPT賬號(hào)..

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

                  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?

                  這里是創(chuàng)建集群類的 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);
                      }
                  

                  有沒(méi)有辦法在 iconCreateFunction 中做到這一點(diǎn)?

                  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) });
                  
                    }"))
                  )
                  

                  推薦答案

                  您可以嘗試將內(nèi)聯(lián) CSS 添加到創(chuàng)建圖標(biāo)的函數(shù)中的不同標(biāo)記,例如:

                  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 為每個(gè)標(biāo)記分配不同的類,并添加 tags$style在標(biāo)題中設(shè)置這些類的 CSS.這是一個(gè)例子:

                  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)
                  

                  無(wú)法弄清楚如何在 shiny 應(yīng)用程序之外的 leaflet 中使用自定義 CSS.

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

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

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

                  相關(guān)文檔推薦

                  Browserify, Babel 6, Gulp - Unexpected token on spread operator(Browserify,Babel 6,Gulp - 傳播運(yùn)算符上的意外令牌)
                  Is it possible to pass a flag to Gulp to have it run tasks in different ways?(是否可以將標(biāo)志傳遞給 Gulp 以使其以不同的方式運(yùn)行任務(wù)?)
                  Why do we need to install gulp globally and locally?(為什么我們需要在全局和本地安裝 gulp?)
                  How to run Gulp tasks sequentially one after the other(如何一個(gè)接一個(gè)地依次運(yùn)行 Gulp 任務(wù))
                  Stylesheet not loaded because of MIME-type(由于 MIME 類型而未加載樣式表)
                  Visual Studio 2015 crashes when opening Javascript files(打開(kāi) Javascript 文件時(shí) 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="h7n77vt" 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. 主站蜘蛛池模板: 播音主持培训-中影人教育播音主持学苑「官网」-中国艺考界的贵族学校 | 山东臭氧发生器,臭氧发生器厂家-山东瑞华环保设备 | 煤矿支护网片_矿用勾花菱形网_缝管式_管缝式锚杆-邯郸市永年区志涛工矿配件有限公司 | 儋州在线-儋州招聘找工作、找房子、找对象,儋州综合生活信息门户! | 陶瓷砂磨机,盘式砂磨机,棒销式砂磨机-无锡市少宏粉体科技有限公司 | 强效碱性清洗剂-实验室中性清洗剂-食品级高纯氮气发生器-上海润榕科学器材有限公司 | 安德建奇火花机-阿奇夏米尔慢走丝|高维|发那科-北京杰森柏汇 | 纸布|钩编布|钩针布|纸草布-莱州佳源工艺纸布厂 | 老城街小面官网_正宗重庆小面加盟技术培训_特色面馆加盟|牛肉拉面|招商加盟代理费用多少钱 | 国产频谱分析仪-国产网络分析仪-上海坚融实业有限公司 | DWS物流设备_扫码称重量方一体机_快递包裹分拣机_广东高臻智能装备有限公司 | 捷码低代码平台 - 3D数字孪生_大数据可视化开发平台「免费体验」 | SRRC认证|CCC认证|CTA申请_IMEI|MAC地址注册-英利检测 | 密集柜_档案密集柜_智能密集架_密集柜厂家_密集架价格-智英伟业 密集架-密集柜厂家-智能档案密集架-自动选层柜订做-河北风顺金属制品有限公司 | 威实软件_软件定制开发_OA_OA办公系统_OA系统_办公自动化软件 | 柔性输送线|柔性链板|齿形链-上海赫勒输送设备有限公司首页[输送机] | 北京网站建设首页,做网站选【优站网】,专注北京网站建设,北京网站推广,天津网站建设,天津网站推广,小程序,手机APP的开发。 | 色油机-色母机-失重|称重式混料机-称重机-米重机-拌料机-[东莞同锐机械]精密计量科技制造商 | 校园文化空间设计-数字化|中医文化空间设计-党建|法治廉政主题文化空间施工-山东锐尚文化传播公司 | 清水混凝土修复_混凝土色差修复剂_混凝土色差调整剂_清水混凝土色差修复_河南天工 | hdpe土工膜-防渗膜-复合土工膜-长丝土工布价格-厂家直销「恒阳新材料」-山东恒阳新材料有限公司 ETFE膜结构_PTFE膜结构_空间钢结构_膜结构_张拉膜_浙江萬豪空间结构集团有限公司 | 钢衬玻璃厂家,钢衬玻璃管道 -山东东兴扬防腐设备有限公司 | 山东螺杆空压机,烟台空压机,烟台开山空压机-烟台开山机电设备有限公司 | 篮球架_乒乓球台_足球门_校园_竞技体育器材_厂家_价格-沧州浩然体育器材有限公司 | 德州万泰装饰 - 万泰装饰装修设计软装家居馆 | 锻造液压机,粉末冶金,拉伸,坩埚成型液压机定制生产厂家-山东威力重工官方网站 | 常州律师事务所_常州律所_常州律师-江苏乐天律师事务所 | 无线对讲-无线对讲系统解决方案-重庆畅博通信 | 乙炔气体报警装置|固定式氯化氢检测仪|河南驰诚电气百科 | 烟台游艇培训,威海游艇培训-烟台市邮轮游艇行业协会 | 东亚液氮罐-液氮生物容器-乐山市东亚机电工贸有限公司 | 联系我们老街华纳娱乐公司官网19989979996(客服) | 山东限矩型液力偶合器_液力耦合器易熔塞厂家-淄博市汇川源机械厂 | 深圳美安可自动化设备有限公司,喷码机,定制喷码机,二维码喷码机,深圳喷码机,纸箱喷码机,东莞喷码机 UV喷码机,日期喷码机,鸡蛋喷码机,管芯喷码机,管内壁喷码机,喷码机厂家 | 郑州墨香品牌设计公司|品牌全案VI设计公司| 行星齿轮减速机,减速机厂家,山东减速机-淄博兴江机械制造 | 河南不锈钢水箱_地埋水箱_镀锌板水箱_消防水箱厂家-河南联固供水设备有限公司 | 科研ELISA试剂盒,酶联免疫检测试剂盒,昆虫_植物ELISA酶免试剂盒-上海仁捷生物科技有限公司 | 间甲酚,间甲酚厂家-山东祥东新材料 | 土壤水分自动监测站-SM150便携式土壤水分仪-铭奥仪器 | 美的商用净水器_美的直饮机_一级代理经销商_Midea租赁价格-厂家反渗透滤芯-直饮水批发品牌售后 |