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

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

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

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

        Leafletjs - marker.bindPopup - 保持所有彈出窗口打開

        leafletjs - marker.bindPopup - keep all popups open(Leafletjs - marker.bindPopup - 保持所有彈出窗口打開)

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

            <tfoot id='l8fJG'></tfoot><legend id='l8fJG'><style id='l8fJG'><dir id='l8fJG'><q id='l8fJG'></q></dir></style></legend>

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

                • <bdo id='l8fJG'></bdo><ul id='l8fJG'></ul>
                    <tbody id='l8fJG'></tbody>
                  本文介紹了Leafletjs - marker.bindPopup - 保持所有彈出窗口打開的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我在使用傳單打開所有彈出窗口時遇到了一些困難.

                  I am having some difficulty keeping all the popups open with leaflet.

                  我在 a 循環中有以下代碼,用于向 LayerGroup 添加標記(ajax 自動更新).

                  I have the following code in the a loop to add markers to a LayerGroup (ajax auto-updating).

                  var marker = L.marker([value.position.lat, value.position.lon],options).addTo(markers);
                  allpoints.push([value.position.lat, value.position.lon]);
                  marker.bindPopup("InfoWindow",{closeOnClick:false,closeButton:false}).openPopup();
                  

                  它工作得很好,除了它只保持最后一個彈出窗口打開.我想保持所有這些開放.我確實在這里(stackoverflow)上找到了一篇關于使用不同標記名稱這樣做的文章,但是我有這個循環.我確實嘗試將 L.marker 放入數組中,但傳單不喜歡那樣.

                  It works great, except it only keeps the last popup open. I would like to keep all of them open. I did find an article on here (stackoverflow) regarding doing so with different marker names, however I have this in a loop. I did try putting L.marker into an array, but leaflet did not like that.

                  有什么想法嗎?

                  推薦答案

                  你需要重寫 Leaflet Map 上的 openpopup 方法,用這個方法的副本替換它,只注釋掉調用 this.closePopup();

                  You will need to override the openpopup method on the Leaflet Map, replacing it with a copy of this method, only comment out the line that calls this.closePopup();

                  在您的頁面上添加

                  L.Map = L.Map.extend({
                      openPopup: function (popup, latlng, options) { 
                          if (!(popup instanceof L.Popup)) {
                          var content = popup;
                  
                          popup = new L.Popup(options).setContent(content);
                          }
                  
                          if (latlng) {
                          popup.setLatLng(latlng);
                          }
                  
                          if (this.hasLayer(popup)) {
                          return this;
                          }
                  
                          // NOTE THIS LINE : COMMENTING OUT THE CLOSEPOPUP CALL
                          //this.closePopup(); 
                          this._popup = popup;
                          return this.addLayer(popup);        
                      }
                  });
                  

                  http://jsfiddle.net/yVLJf/37/

                  您可以在此處找到原始 Leaflet openPopup 方法:https://github.com/Leaflet/Leaflet/blob/1acffc5a3d31010b7d613382ab2a5830ecee5dd5/src/layer/Popup.js#L290

                  You can find the original Leaflet openPopup method here: https://github.com/Leaflet/Leaflet/blob/1acffc5a3d31010b7d613382ab2a5830ecee5dd5/src/layer/Popup.js#L290

                  這篇關于Leafletjs - marker.bindPopup - 保持所有彈出窗口打開的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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 圖層控件添加到側邊欄)
                  <legend id='OJ0kW'><style id='OJ0kW'><dir id='OJ0kW'><q id='OJ0kW'></q></dir></style></legend>

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

                      <tfoot id='OJ0kW'></tfoot>
                        <tbody id='OJ0kW'></tbody>

                        • <bdo id='OJ0kW'></bdo><ul id='OJ0kW'></ul>
                          <i id='OJ0kW'><tr id='OJ0kW'><dt id='OJ0kW'><q id='OJ0kW'><span id='OJ0kW'><b id='OJ0kW'><form id='OJ0kW'><ins id='OJ0kW'></ins><ul id='OJ0kW'></ul><sub id='OJ0kW'></sub></form><legend id='OJ0kW'></legend><bdo id='OJ0kW'><pre id='OJ0kW'><center id='OJ0kW'></center></pre></bdo></b><th id='OJ0kW'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='OJ0kW'><tfoot id='OJ0kW'></tfoot><dl id='OJ0kW'><fieldset id='OJ0kW'></fieldset></dl></div>
                          1. 主站蜘蛛池模板: 亚洲精品乱码久久久久v最新版 | 欧美日韩国产一区二区三区 | 99精品久久 | 国产中文字幕网 | 在线一区二区国产 | 日韩欧美第一页 | 日日干夜夜操天天操 | 久久久久久亚洲 | 在线免费看黄 | 久久机热| 三级视频在线观看电影 | 成人精品免费视频 | 国产精品日韩高清伦字幕搜索 | 日本一二区视频 | 日韩免费高清视频 | 欧美激情久久久 | 亚洲一区二区中文字幕在线观看 | 国产乱码精品1区2区3区 | av中文字幕在线 | 国产精品欧美一区二区三区 | 亚洲免费精品一区 | 伊人久久精品一区二区三区 | 成人毛片网 | 不卡一区二区三区四区 | 欧美一区二区三区日韩 | 日日夜夜天天 | 韩国久久 | 久久精品一 | 精品久久香蕉国产线看观看亚洲 | 国产精产国品一二三产区视频 | 精品久久久久久久人人人人传媒 | 看羞羞视频 | 97av在线 | 成年人网站国产 | www.亚洲一区二区 | 在线播放中文字幕 | 在线观看日本高清二区 | 欧美激情一区 | 国产成人在线视频免费观看 | 精品久久久久久久久久久久久久 | 美女艹b|