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. 主站蜘蛛池模板: 致胜管家软件服务【在线免费体验】 | 百度爱采购运营研究社社群-店铺托管-爱采购代运营-良言多米网络公司 | 合肥卓创建筑装饰,专业办公室装饰、商业空间装修与设计。 | 无压烧结银_有压烧结银_导电银胶_导电油墨_导电胶-善仁(浙江)新材料 | 高博医疗集团上海阿特蒙医院 | 电采暖锅炉_超低温空气源热泵_空气源热水器-鑫鲁禹电锅炉空气能热泵厂家 | 潍坊大集网-潍坊信息港-潍坊信息网 | 浇钢砖,流钢砖_厂家价低-淄博恒森耐火材料有限公司 | 运动木地板厂家_体育木地板安装_篮球木地板选购_实木运动地板价格 | 提升海外网站流量,增加国外网站访客UV,定制海外IP-访客王 | 全屋整木定制-橱柜,家具定制-四川峨眉山龙马木业有限公司 | 模具硅橡胶,人体硅胶,移印硅胶浆厂家-宏图硅胶科技 | 集装箱箱号识别_自重载重图像识别_铁路车号自动识别_OCR图像识别 | 螺钉式热电偶_便携式温度传感器_压簧式热电偶|无锡联泰仪表有限公司|首页 | 卫生纸复卷机|抽纸机|卫生纸加工设备|做卫生纸机器|小型卫生纸加工需要什么设备|卫生纸机器设备多少钱一台|许昌恒源纸品机械有限公司 | 珠海网站建设_响应网站建设_珠海建站公司_珠海网站设计与制作_珠海网讯互联 | 隔离变压器-伺服变压器--输入输出电抗器-深圳市德而沃电气有限公司 | 工业胀紧套_万向节联轴器_链条-规格齐全-型号选购-非标订做-厂家批发价格-上海乙谛精密机械有限公司 | 汽液过滤网厂家_安平县银锐丝网有限公司| 医疗仪器模块 健康一体机 多参数监护仪 智慧医疗仪器方案定制 血氧监护 心电监护 -朗锐慧康 | 北京自然绿环境科技发展有限公司专业生产【洗车机_加油站洗车机-全自动洗车机】 | 滤芯,过滤器,滤油机,贺德克滤芯,精密滤芯_新乡市宇清流体净化技术有限公司 | 作文导航网_作文之家_满分作文_优秀作文_作文大全_作文素材_最新作文分享发布平台 | 菲希尔X射线测厚仪-菲希尔库伦法测厚仪-无锡骏展仪器有限责任公司 | 洛阳防爆合格证办理-洛阳防爆认证机构-洛阳申请国家防爆合格证-洛阳本安防爆认证代办-洛阳沪南抚防爆电气技术服务有限公司 | 双吸泵,双吸泵厂家,OS双吸泵-山东博二泵业有限公司 | 立刷【微电签pos机】-嘉联支付立刷运营中心 | 陶瓷加热器,履带式加热器-吴江市兴达电热设备厂 | 济南保安公司加盟挂靠-亮剑国际安保服务集团总部-山东保安公司|济南保安培训学校 | 防水套管厂家-柔性防水套管-不锈钢|刚性防水套管-天翔管道 | 不锈钢钢格栅板_热浸锌钢格板_镀锌钢格栅板_钢格栅盖板-格美瑞 | 没斑啦-专业的祛斑美白嫩肤知识网站-去斑经验分享 | 深圳美安可自动化设备有限公司,喷码机,定制喷码机,二维码喷码机,深圳喷码机,纸箱喷码机,东莞喷码机 UV喷码机,日期喷码机,鸡蛋喷码机,管芯喷码机,管内壁喷码机,喷码机厂家 | 即用型透析袋,透析袋夹子,药敏纸片,L型涂布棒-上海桥星贸易有限公司 | 无锡门窗-系统门窗-阳光房-封阳台-断桥铝门窗厂[窗致美] | 南京技嘉环保科技有限公司-杀菌除臭剂|污水|垃圾|厕所|橡胶厂|化工厂|铸造厂除臭剂 | 挤塑板-XPS挤塑板-挤塑板设备厂家[襄阳欧格] | 成都APP开发-成都App定制-成都app开发公司-【未来久】 | 「安徽双凯」自动售货机-无人售货机-成人用品-自动饮料食品零食售货机 | 亚克隆,RNAi干扰检测,miRNA定量检测-上海基屹生物科技有限公司 | 全钢实验台,实验室工作台厂家-无锡市辰之航装饰材料有限公司 |