pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

<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="jfzp7vb" 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="zx7rxl7" 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="7z7x7tb" id='OJ0kW'><tfoot id='OJ0kW'></tfoot><dl id='OJ0kW'><fieldset id='OJ0kW'></fieldset></dl></div>
                          1. 主站蜘蛛池模板: 恒温水槽与水浴锅-上海熙浩实业有限公司 | 河北码上网络科技|邯郸小程序开发|邯郸微信开发|邯郸网站建设 | 天津拓展_天津团建_天津趣味运动会_天津活动策划公司-天津华天拓展培训中心 | 南京兰江泵业有限公司-水解酸化池潜水搅拌机-絮凝反应池搅拌机-好氧区潜水推进器 | 液氮罐_液氮容器_自增压液氮罐_杜瓦瓶_班德液氮罐厂家 | 仪器仪表网 - 永久免费的b2b电子商务平台 | 潜水搅拌机-双曲面搅拌机-潜水推进器|奥伯尔环保| 双菱电缆-广州电缆厂_广州电缆厂有限公司 | 环氧树脂地坪_防静电地坪漆_环氧地坪漆涂料厂家-地壹涂料地坪漆 环球电气之家-中国专业电气电子产品行业服务网站! | 光栅尺厂家_数显表维修-苏州泽升精密机械 | 二手光谱仪维修-德国OBLF光谱仪|进口斯派克光谱仪-热电ARL光谱仪-意大利GNR光谱仪-永晖检测 | 四探针电阻率测试仪-振实密度仪-粉末流动性测定仪-宁波瑞柯微智能 | 北京晚会活动策划|北京节目录制后期剪辑|北京演播厅出租租赁-北京龙视星光文化传媒有限公司 | 深圳APP开发_手机软件APP定制外包_小程序开发公司-来科信 | 收录网| 湖州织里童装_女童男童中大童装_款式多尺码全_织里儿童网【官网】-嘉兴嘉乐网络科技有限公司 | 泰来华顿液氮罐,美国MVE液氮罐,自增压液氮罐,定制液氮生物容器,进口杜瓦瓶-上海京灿精密机械有限公司 | 电位器_轻触开关_USB连接器_广东精密龙电子科技有限公司 | 游泳池设备安装工程_恒温泳池设备_儿童游泳池设备厂家_游泳池水处理设备-东莞市君达泳池设备有限公司 | 专业深孔加工_东莞深孔钻加工_东莞深孔钻_东莞深孔加工_模具深孔钻加工厂-东莞市超耀实业有限公司 | 橡胶弹簧|复合弹簧|橡胶球|振动筛配件-新乡市永鑫橡胶厂 | H型钢切割机,相贯线切割机,数控钻床,数控平面钻,钢结构设备,槽钢切割机,角钢切割机,翻转机,拼焊矫一体机 | 重庆钣金加工厂家首页-专业定做监控电视墙_操作台 | 尼龙PA610树脂,尼龙PA612树脂,尼龙PA1010树脂,透明尼龙-谷骐科技【官网】 | 3d打印服务,3d打印汽车,三维扫描,硅胶复模,手板,快速模具,深圳市精速三维打印科技有限公司 | 上海质量认证办理中心| 板框压滤机-隔膜压滤机-厢式压滤机生产厂家-禹州市君工机械设备有限公司 | 丹佛斯变频器-丹佛斯压力开关-变送器-广州市风华机电设备有限公司 | 安全,主动,被动,柔性,山体滑坡,sns,钢丝绳,边坡,防护网,护栏网,围栏,栏杆,栅栏,厂家 - 护栏网防护网生产厂家 | 矿用履带式平板车|探水钻机|气动架柱式钻机|架柱式液压回转钻机|履带式钻机-启睿探水钻机厂家 | 【同风运车官网】一站式汽车托运服务平台,验车满意再付款 | 耐磨陶瓷,耐磨陶瓷管道_厂家-淄博拓创陶瓷科技 | ET3000双钳形接地电阻测试仪_ZSR10A直流_SXJS-IV智能_SX-9000全自动油介质损耗测试仪-上海康登 | 考勤系统_人事考勤管理系统_本地部署BS考勤系统_考勤软件_天时考勤管理专家 | 房车价格_依维柯/大通/东风御风/福特全顺/江铃图片_云梯搬家车厂家-程力专用汽车股份有限公司 | 合肥展厅设计-安徽展台设计-合肥展览公司-安徽奥美展览工程有限公司 | 气动|电动调节阀|球阀|蝶阀-自力式调节阀-上海渠工阀门管道工程有限公司 | 理化生实验室设备,吊装实验室设备,顶装实验室设备,实验室成套设备厂家,校园功能室设备,智慧书法教室方案 - 东莞市惠森教学设备有限公司 | 创富网-B2B网站|供求信息网|b2b平台|专业电子商务网站 | 酒精检测棒,数显温湿度计,酒安酒精测试仪,酒精检测仪,呼气式酒精检测仪-郑州欧诺仪器有限公司 | 在线悬浮物浓度计-多参数水质在线检测仪-上海沃懋仪表科技有限公司 |