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

      <legend id='3oNWz'><style id='3oNWz'><dir id='3oNWz'><q id='3oNWz'></q></dir></style></legend>
    1. <i id='3oNWz'><tr id='3oNWz'><dt id='3oNWz'><q id='3oNWz'><span id='3oNWz'><b id='3oNWz'><form id='3oNWz'><ins id='3oNWz'></ins><ul id='3oNWz'></ul><sub id='3oNWz'></sub></form><legend id='3oNWz'></legend><bdo id='3oNWz'><pre id='3oNWz'><center id='3oNWz'></center></pre></bdo></b><th id='3oNWz'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='3oNWz'><tfoot id='3oNWz'></tfoot><dl id='3oNWz'><fieldset id='3oNWz'></fieldset></dl></div>
    2. <tfoot id='3oNWz'></tfoot>
        <bdo id='3oNWz'></bdo><ul id='3oNWz'></ul>
    3. <small id='3oNWz'></small><noframes id='3oNWz'>

      更改傳單標(biāo)記群集圖標(biāo)顏色,繼承其余默認(rèn) CSS

      Changing leaflet markercluster icon color, inheriting the rest of the default CSS properties(更改傳單標(biāo)記群集圖標(biāo)顏色,繼承其余默認(rèn) CSS 屬性)
          <legend id='eInW0'><style id='eInW0'><dir id='eInW0'><q id='eInW0'></q></dir></style></legend>

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

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

              <bdo id='eInW0'></bdo><ul id='eInW0'></ul>
              1. 本文介紹了更改傳單標(biāo)記群集圖標(biāo)顏色,繼承其余默認(rèn) CSS 屬性的處理方法,對大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                問題描述

                所以,我正在嘗試更改傳單地圖中標(biāo)記群集圖標(biāo)的顏色.我只想更改繼承其余默認(rèn)屬性(即形狀、文本屬性等)的顏色.

                在這個(gè)

                我知道我必須自定義 iconCreateFunction.我正在嘗試這種方式:

                CSS

                .foo { 背景顏色:紅色;}.bar { 背景顏色:藍(lán)色;}

                JavaScript

                var 標(biāo)記 = L.markerClusterGroup({iconCreateFunction:函數(shù)(集群){//這里有一段代碼決定了變量 'class_name' 的值是 foo 還是 barreturn L.divIcon({ className: "marker-cluster-medium "+class_name});}});

                不幸的是,該解決方案不起作用并導(dǎo)致圖標(biāo)呈現(xiàn)丑陋.

                我怎樣才能改變默認(rèn)markercluster圖標(biāo)的顏色?

                解決方案

                你的 iconCreateFunction 應(yīng)該是這樣的

                iconCreateFunction: function (cluster) {var childCount = cluster.getChildCount();var c = 'marker-cluster-';if (childCount < 10) {c += '小';}否則 if (childCount < 100) {c += '中等';}別的 {c +='大';}return new L.DivIcon({ html: '<div><span>' + childCount + '</span></div>',className: 'marker-cluster' + c, iconSize: new L.Point(40, 40) });}

                給 css 一些類似的東西

                .marker-cluster-small {背景顏色:rgba(218, 94, 94, 0.6);}.marker-cluster-小 div {背景顏色:rgba(226, 36, 36, 0.6);}.marker-cluster-medium {背景色:rgba(241, 211, 87, 0.6);}.marker-cluster-medium div {背景顏色:rgba(240, 194, 12, 0.6);}.marker-cluster-large {背景色:rgba(253, 156, 115, 0.6);}.marker-cluster-大 div {背景色:rgba(241, 128, 23, 0.6);}

                完整的工作示例請參見下面的 plunker

                https://plnkr.co/edit/GvDbB1rzIZ4bvIkQjM0p?p=preview

                So, I'm trying to change the color of the markercluster icons in a leaflet map. I just want to change the color inheriting the rest of the default properties (i.e., shape, text properties, etc...).

                In this an example, there is something similar to what I want to get, but they define a brand new CSS class without using the default icons styling. What I need is something like this but with custom colors:

                I do know that I have to customize iconCreateFunction. I'm trying in this way:

                CSS

                .foo { background-color: red;}
                .bar { background-color: blue;}
                

                JavaScript

                var markers = L.markerClusterGroup({
                    iconCreateFunction: function(cluster) {
                        // here there is a piece code that determines the value of the variable 'class_name' is either foo or bar
                        return L.divIcon({ className: "marker-cluster-medium "+class_name});
                    }
                });
                

                Unfortunately, that solution does not work and leads to a ugly icon rendering.

                How can I just change the color of the default markercluster icons?

                解決方案

                your iconCreateFunction should look some thing like this

                iconCreateFunction: function (cluster) {
                 var childCount = cluster.getChildCount();
                 var c = ' marker-cluster-';
                 if (childCount < 10) {
                   c += 'small';
                 } 
                 else if (childCount < 100) {
                   c += 'medium';
                 } 
                 else {
                   c += 'large';
                 }
                
                 return new L.DivIcon({ html: '<div><span>' + childCount + '</span></div>', 
                  className: 'marker-cluster' + c, iconSize: new L.Point(40, 40) });
                 }
                

                and give css some thing like this

                .marker-cluster-small {
                background-color: rgba(218, 94, 94, 0.6);
                }
                .marker-cluster-small div {
                background-color: rgba(226, 36, 36, 0.6);
                }
                .marker-cluster-medium {
                background-color: rgba(241, 211, 87, 0.6);
                }
                .marker-cluster-medium div {
                background-color: rgba(240, 194, 12, 0.6);
                }
                
                .marker-cluster-large {
                background-color: rgba(253, 156, 115, 0.6);
                }
                .marker-cluster-large div {
                background-color: rgba(241, 128, 23, 0.6);
                }
                

                see the below plunker for complete working example

                https://plnkr.co/edit/GvDbB1rzIZ4bvIkQjM0p?p=preview

                這篇關(guān)于更改傳單標(biāo)記群集圖標(biāo)顏色,繼承其余默認(rèn) CSS 屬性的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                相關(guān)文檔推薦

                Check if a polygon point is inside another in leaflet(檢查一個(gè)多邊形點(diǎn)是否在傳單中的另一個(gè)內(nèi)部)
                Trigger click on leaflet marker(觸發(fā)點(diǎn)擊傳單標(biāo)記)
                How can I change the default loading tile color in LeafletJS?(如何更改 LeafletJS 中的默認(rèn)加載磁貼顏色?)
                Add external geojson to leaflet layer(將外部geojson添加到傳單層)
                Adding Leaflet layer control to sidebar(將 Leaflet 圖層控件添加到側(cè)邊欄)
                Leaflet - get latitude and longitude of a marker inside a pop-up(Leaflet - 在彈出窗口中獲取標(biāo)記的緯度和經(jīng)度)

                  <tbody id='knPsN'></tbody>

                • <tfoot id='knPsN'></tfoot>
                  • <bdo id='knPsN'></bdo><ul id='knPsN'></ul>
                    <legend id='knPsN'><style id='knPsN'><dir id='knPsN'><q id='knPsN'></q></dir></style></legend>

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

                        <i id='knPsN'><tr id='knPsN'><dt id='knPsN'><q id='knPsN'><span id='knPsN'><b id='knPsN'><form id='knPsN'><ins id='knPsN'></ins><ul id='knPsN'></ul><sub id='knPsN'></sub></form><legend id='knPsN'></legend><bdo id='knPsN'><pre id='knPsN'><center id='knPsN'></center></pre></bdo></b><th id='knPsN'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='knPsN'><tfoot id='knPsN'></tfoot><dl id='knPsN'><fieldset id='knPsN'></fieldset></dl></div>
                        1. 主站蜘蛛池模板: 欧美精品久久久久久久久久 | 国产成人精品一区二区三区视频 | 日本电影免费完整观看 | 亚洲国产精品第一区二区 | 91久久久久久久久久久 | 国产日韩亚洲欧美 | 免费一区二区三区在线视频 | 日韩精品一区二区三区视频播放 | 欧美国产在线一区 | 久久精品国产一区二区电影 | 成人免费视频在线观看 | 欧美区日韩区 | 最新日韩av | 中文av电影| 中文在线亚洲 | 亚洲免费成人 | 国产欧美视频一区二区三区 | 欧美成人精品一区 | 盗摄精品av一区二区三区 | 国产高清在线精品 | 国产精品1区2区3区 一区中文字幕 | 91视频进入 | 少妇诱惑av| 久久精品视频免费看 | 精品粉嫩aⅴ一区二区三区四区 | www.久久艹 | 日韩网站在线观看 | 国产在线观看免费 | 久久精品国产一区 | av网站在线播放 | 一级a性色生活片久久毛片 午夜精品在线观看 | 国产精品久久久久久高潮 | 午夜精品久久久久久久 | 国产精品1| 亚洲精品中文在线 | 一级无毛片 | 中文字幕在线精品 | 成人av免费 | 性视频网 | 国产精品18久久久久久白浆动漫 | 国产精品久久久久久久久久免费看 |