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

    1. <tfoot id='NfPEK'></tfoot>
      • <bdo id='NfPEK'></bdo><ul id='NfPEK'></ul>

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

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

        傳單R,如何使與兒童統計相關的聚集圖標出現

        leaflet R, how to make appearance of clustered icon related to statistics of the children?(傳單R,如何使與兒童統計相關的聚集圖標出現?)
      1. <i id='Qxn97'><tr id='Qxn97'><dt id='Qxn97'><q id='Qxn97'><span id='Qxn97'><b id='Qxn97'><form id='Qxn97'><ins id='Qxn97'></ins><ul id='Qxn97'></ul><sub id='Qxn97'></sub></form><legend id='Qxn97'></legend><bdo id='Qxn97'><pre id='Qxn97'><center id='Qxn97'></center></pre></bdo></b><th id='Qxn97'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='Qxn97'><tfoot id='Qxn97'></tfoot><dl id='Qxn97'><fieldset id='Qxn97'></fieldset></dl></div>
          <tbody id='Qxn97'></tbody>

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

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

                • <tfoot id='Qxn97'></tfoot>
                  <legend id='Qxn97'><style id='Qxn97'><dir id='Qxn97'><q id='Qxn97'></q></dir></style></legend>
                  本文介紹了傳單R,如何使與兒童統計相關的聚集圖標出現?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我想根據子標記的屬性總和在 Leaflet/Shiny 應用程序中自定義聚集標記的外觀.

                  I'd like to customize appearance of clustered markers in Leaflet/Shiny application based on sum of an attribute of child markers.

                  類似于這個問題,它根據孩子的數量制作集群的圖標顏色.如果我想根據地震震級和自定義圖標怎么辦?

                  It is similar to this problem, which makes icon color of clusters based on count of children. What if I want to customize icon based on the sum of magnitude of earthquakes?

                  使用純 javascript 應用程序,似乎我應該能夠將自定義屬性設置為單個標記,然后從 iconCreateFunction 訪問它,就像在 這個例子.

                  With pure javascript application, seems like I should be able to set custom property to individual marker, then access it from iconCreateFunction, as done in this example.

                  但是我正在為 R 的傳單添加帶有 addCircleMarkersaddMarkers 的標記,并且似乎我不能為正在生成的標記添加任意屬性.下面的代碼有效,但如果我取消注釋兩行(mag = ~magsum += markers[i].mag;)

                  But I am adding marker with addCircleMarkers and addMarkers from leaflet for R, and doesn't seem i can add arbitrary attribute to markers being generated. Code below works but it doesn't if i uncomment two lines (mag = ~mag and sum += markers[i].mag;)

                  leaflet(quakes) %>% addTiles() %>% addMarkers(
                    # mag = ~mag,
                    clusterOptions = markerClusterOptions(
                    iconCreateFunction=JS("function (cluster) {    
                      var markers = cluster.getAllChildMarkers();
                      var sum = 0; 
                      for (i = 0; i < markers.length; i++) {
                      //  sum += markers[i].mag;
                        sum += 1;
                      }
                      return new L.DivIcon({ html: '<div><span>' + sum + '</span></div>'});
                  
                    }")
                  
                    )
                  )
                  

                  我想過使用 addMarkerslabel= 選項,然后從 Javascript 中解析它.但是在 JS 的標記簇上使用 getAllChildMarkers() 訪問的標記似乎沒有 label 屬性.

                  I thought about using label= option of addMarkers, and then parse it from Javascript. But the markers accessed with getAllChildMarkers() on marker cluster in JS does not seem to have label property.

                  我還考慮過將數據幀從 R 傳遞到傳單(JS),不知何故,也許 喜歡這個例子,或 this ...?

                  I also thought about passing a dataframe from R to leaflet(JS), somehow, maybe like this example, or this ...?

                  推薦答案

                  找到了我的答案.似乎我可以在 addMarkeroptions= 中放置任意屬性:

                  Found my answer. Seems like I can put arbitrary property inside options= in addMarker:

                  leaflet(quakes) %>% addTiles() %>% addMarkers(
                    options = markerOptions(mag = ~mag),
                    clusterOptions = markerClusterOptions(
                    iconCreateFunction=JS("function (cluster) {    
                      var markers = cluster.getAllChildMarkers();
                      var sum = 0; 
                      for (i = 0; i < markers.length; i++) {
                        sum += Number(markers[i].options.mag);
                  //      sum += 1;
                      }
                      return new L.DivIcon({ html: '<div><span>' + sum + '</span></div>'});
                    }")
                    )
                  )
                  

                  這篇關于傳單R,如何使與兒童統計相關的聚集圖標出現?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                  相關文檔推薦

                  Check if a polygon point is inside another in leaflet(檢查一個多邊形點是否在傳單中的另一個內部)
                  Changing leaflet markercluster icon color, inheriting the rest of the default CSS properties(更改傳單標記群集圖標顏色,繼承其余默認 CSS 屬性)
                  Trigger click on leaflet marker(觸發點擊傳單標記)
                  How can I change the default loading tile color in LeafletJS?(如何更改 LeafletJS 中的默認加載磁貼顏色?)
                  Add external geojson to leaflet layer(將外部geojson添加到傳單層)
                  Adding Leaflet layer control to sidebar(將 Leaflet 圖層控件添加到側邊欄)
                  • <bdo id='SRcMs'></bdo><ul id='SRcMs'></ul>
                    <legend id='SRcMs'><style id='SRcMs'><dir id='SRcMs'><q id='SRcMs'></q></dir></style></legend>
                  • <i id='SRcMs'><tr id='SRcMs'><dt id='SRcMs'><q id='SRcMs'><span id='SRcMs'><b id='SRcMs'><form id='SRcMs'><ins id='SRcMs'></ins><ul id='SRcMs'></ul><sub id='SRcMs'></sub></form><legend id='SRcMs'></legend><bdo id='SRcMs'><pre id='SRcMs'><center id='SRcMs'></center></pre></bdo></b><th id='SRcMs'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='SRcMs'><tfoot id='SRcMs'></tfoot><dl id='SRcMs'><fieldset id='SRcMs'></fieldset></dl></div>
                      <tbody id='SRcMs'></tbody>

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

                        <tfoot id='SRcMs'></tfoot>
                          • 主站蜘蛛池模板: 国产一级片av | 精品一区二区三区av | 在线伊人网 | 亚洲天堂成人在线视频 | 一区二区三区中文 | 久久久99国产精品免费 | 91精品国产一区二区三区 | 精精国产xxxx视频在线野外 | 久久久国产精品 | 欧美亚洲免费 | 欧美在线免费 | 午夜av免费 | 99精品视频一区二区三区 | 久久精品免费看 | 日韩久久综合 | 久久国产精品久久久久久 | 欧美日韩成人一区二区 | 97久久久| av影音| 亚洲导航深夜福利涩涩屋 | 国产玖玖| 美国av片在线观看 | 一区二区三区四区免费在线观看 | 国产精品成人在线观看 | 国产视频不卡一区 | 欧美久久久久久久久 | 欧美一区不卡 | 影音先锋成人资源 | 精品国产亚洲一区二区三区大结局 | 国产亚洲精品久久久久久牛牛 | 亚洲天堂精品一区 | 国产精品入口麻豆www | 国产精品免费一区二区三区 | 少妇一级淫片aaaaaaaaa | 91精品国产欧美一区二区 | 亚洲精品日韩精品 | 一区二区三区亚洲视频 | 欧美一区视频 | 欧美一区二区成人 | www.久久精品视频 | 久久午夜视频 |