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

    <legend id='Xly9J'><style id='Xly9J'><dir id='Xly9J'><q id='Xly9J'></q></dir></style></legend>

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

  1. <tfoot id='Xly9J'></tfoot>

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

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

    1. Leaflet Markercluster:從聚類中免除標記

      Leaflet Markercluster: Exempt marker from clustering(Leaflet Markercluster:從聚類中免除標記)
      1. <small id='589Oh'></small><noframes id='589Oh'>

            <bdo id='589Oh'></bdo><ul id='589Oh'></ul>
            <tfoot id='589Oh'></tfoot>

              <tbody id='589Oh'></tbody>

            • <legend id='589Oh'><style id='589Oh'><dir id='589Oh'><q id='589Oh'></q></dir></style></legend>

              1. <i id='589Oh'><tr id='589Oh'><dt id='589Oh'><q id='589Oh'><span id='589Oh'><b id='589Oh'><form id='589Oh'><ins id='589Oh'></ins><ul id='589Oh'></ul><sub id='589Oh'></sub></form><legend id='589Oh'></legend><bdo id='589Oh'><pre id='589Oh'><center id='589Oh'></center></pre></bdo></b><th id='589Oh'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='589Oh'><tfoot id='589Oh'></tfoot><dl id='589Oh'><fieldset id='589Oh'></fieldset></dl></div>
              2. 本文介紹了Leaflet Markercluster:從聚類中免除標記的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                如何在縮小時檢查帶有打開彈出窗口的標記以防止折疊成簇?

                How can one exampt a marker with open popup from collapsing into a cluster when zooming out?

                我正在使用 leaflet 和 markercluster 在 這個例子:

                I am using leaflet and markercluster as set up in this example:

                HTML:

                <div id="map"></div>
                

                CSS:

                html,
                body {
                  height: 100%;
                }
                
                #map {
                  height: 100%;
                }
                

                JS:

                const map = L.map('map', {
                    zoom: 5,
                    center: [0,0],
                    maxZoom: 18
                });
                const clustered = L.markerClusterGroup();
                map.addLayer(clustered);
                
                const m1 = L.marker(L.latLng(0,0));
                m1.addTo(clustered);
                m1.bindPopup('one');
                
                const m2 = L.marker(L.latLng(0,1));
                m2.addTo(clustered);
                m2.bindPopup('two');
                
                const m3 = L.marker(L.latLng(1,0));
                m3.addTo(clustered);
                m3.bindPopup('three');
                

                我想暫時避免標記折疊成一個集群只要它的彈出窗口是打開的.例如,這意味著:

                I would like to temporarily exempt a marker from collapsing into a cluster as long as its popup is open. For the example, this would mean:

                1. 放大直到看到各個標記.

                1. Zoom in until you see the individual markers.

                單擊一個以打開一個彈出窗口.

                Click one to open a popup.

                再次縮小.

                彈出"標記應與打開的彈出窗口一起可見.剩余的標記應該折疊起來.

                The "popped up" marker should be visible, together with the open popup. The remaining markers should collapse.

                1. 當彈出窗口關閉時,標記應該消失在集群中.

                我嘗試在 popupopen(和 popupclose)上將標記臨時移動到地圖(并返回),但這不起作用:

                I've tried to temporarily move the marker to the map (and back) on popupopen (and popupclose), but this does not work:

                map.on('popupopen', function(e) {
                    const m = e.popup._source;
                    clustered.removeLayer(m);
                    map.addLayer(m);
                });
                map.on('popupclose', function(e) {
                    let m = e.popup._source;
                    map.removeLayer(m);
                    clustered.addLayer(m);
                });
                

                有什么想法嗎?

                推薦答案

                現在 這個 似乎正在工作.我必須添加一個單獨的層unclustered,只在集群層處理popupopen,只在非集群層處理popupclose

                Now this seems to be working. I had to add a separate layer unclustered, and handle popupopen only in the clustering layer, and popupclose only in the unclustered layer

                const unclustered = L.markerClusterGroup(); // NOTE
                map.addLayer(unclustered);
                clustered.on('popupopen', function(e) {
                    console.log('open');
                    const m = e.popup._source;
                    clustered.removeLayer(m);
                    unclustered.addLayer(m);
                    m.openPopup();
                });
                unclustered.on('popupclose', function(e) {
                    console.log('close');
                    let m = e.popup._source;
                    unclustered.removeLayer(m);
                    clustered.addLayer(m);
                    m.closePopup();
                });
                

                注意:我不喜歡將 L.markerClusterGroup 用于非集群層.但我不知道還有什么.只要該層中只有一個標記,它就會起作用.但是為了避免多個標記折疊成一個簇,必須使用不同的層.哪一個?L.layerGroup 不起作用.

                NOTE: I'm not happy with using L.markerClusterGroup for the unclustered layer. But I would not know what else. As long as there's only one marker in that layer, it will work. But to exempt multiple markers from collapsing into a cluster, a different layer must be used. Which one? L.layerGroup does not work.

                這篇關于Leaflet Markercluster:從聚類中免除標記的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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 圖層控件添加到側邊欄)

                        <tbody id='miUmm'></tbody>
                        <bdo id='miUmm'></bdo><ul id='miUmm'></ul>
                      • <small id='miUmm'></small><noframes id='miUmm'>

                          <tfoot id='miUmm'></tfoot>
                        1. <legend id='miUmm'><style id='miUmm'><dir id='miUmm'><q id='miUmm'></q></dir></style></legend>

                        2. <i id='miUmm'><tr id='miUmm'><dt id='miUmm'><q id='miUmm'><span id='miUmm'><b id='miUmm'><form id='miUmm'><ins id='miUmm'></ins><ul id='miUmm'></ul><sub id='miUmm'></sub></form><legend id='miUmm'></legend><bdo id='miUmm'><pre id='miUmm'><center id='miUmm'></center></pre></bdo></b><th id='miUmm'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='miUmm'><tfoot id='miUmm'></tfoot><dl id='miUmm'><fieldset id='miUmm'></fieldset></dl></div>
                          主站蜘蛛池模板: 老子午夜影院 | 成人性生交大免费 | 人人擦人人干 | 欧美一区二区在线观看 | 亚洲一区 中文字幕 | 久操福利 | 欧美日本在线观看 | 九九热精品视频 | 久久久综合久久 | 国产一区二区不卡 | 韩三级在线观看 | 美日韩中文字幕 | 久久国 | 免费在线看黄视频 | 久久av综合| 亚洲精品成人免费 | 97偷拍视频 | 精品久久国产 | 欧美操操操 | 亚洲欧美高清 | 天天综合永久 | 亚洲一区中文 | 91不卡在线| 国产成人精品一区二区三区网站观看 | 欧美一区免费 | 国产成人久久久 | 色综合天天天天做夜夜夜夜做 | 香蕉一区二区 | 成人中文字幕在线 | 欧美精品一区二区免费 | 欧美性乱 | 中文字幕一区二区三区四区五区 | 精品国产乱码久久久 | av黄色在线观看 | 日韩aⅴ在线观看 | 国产乱码精品1区2区3区 | 成年人在线视频 | 综合久久网 | 国产美女精品视频 | 一区二区三区国产精品 | 黄色片大全在线观看 |