久久久久久久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>
                          主站蜘蛛池模板: 国产成人a亚洲精品 | 国产免费看 | 91精品久久久久久久99 | 国产精品国产精品国产专区不卡 | 99久久精品免费看国产小宝寻花 | 中文字幕高清av | www.久久久久久久久 | 九九九国产 | 色噜噜亚洲男人的天堂 | www免费视频| 视频一区欧美 | 一区在线视频 | 福利社午夜影院 | 91久久精品一区二区二区 | 久久综合久色欧美综合狠狠 | 欧美男人天堂 | 三级黄色大片网站 | 一级视频黄色 | 日韩美香港a一级毛片免费 国产综合av | 国产成人在线视频播放 | 99热精品在线观看 | 草逼网站 | 国产亚洲二区 | 国产一区三区视频 | 免费视频一区二区 | 国产日韩一区二区三区 | 国产精品毛片无码 | 国产高清美女一级a毛片久久w | 日韩在线视频免费观看 | 黄色一级免费 | 一级欧美视频 | 亚洲一区二区精品 | 欧美日韩精品在线免费观看 | 91精品国产91久久久久久不卞 | 色资源在线视频 | 国产精品视频一区二区三区不卡 | 日本不卡一区二区三区在线观看 | 中文字幕在线第一页 | 日韩欧美在线播放 | 亚洲三级国产 | 日日碰狠狠躁久久躁婷婷 |