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

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

    2. <tfoot id='Lznhy'></tfoot>

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

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

        傳單雜食+聚類標記+過濾標記聚類組

        Leaflet omnivore + clustering markers + filtering marker cluster group(傳單雜食+聚類標記+過濾標記聚類組)
        <legend id='r59xo'><style id='r59xo'><dir id='r59xo'><q id='r59xo'></q></dir></style></legend>
        <i id='r59xo'><tr id='r59xo'><dt id='r59xo'><q id='r59xo'><span id='r59xo'><b id='r59xo'><form id='r59xo'><ins id='r59xo'></ins><ul id='r59xo'></ul><sub id='r59xo'></sub></form><legend id='r59xo'></legend><bdo id='r59xo'><pre id='r59xo'><center id='r59xo'></center></pre></bdo></b><th id='r59xo'></th></span></q></dt></tr></i><div class="eeszyig" id='r59xo'><tfoot id='r59xo'></tfoot><dl id='r59xo'><fieldset id='r59xo'></fieldset></dl></div>

        • <bdo id='r59xo'></bdo><ul id='r59xo'></ul>
          <tfoot id='r59xo'></tfoot>
            <tbody id='r59xo'></tbody>

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

                1. 本文介紹了傳單雜食+聚類標記+過濾標記聚類組的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我嘗試使用 Mapbox 和 Leafet 的雜食插件制作地圖,以便使用教程搜索數據.在我的情況下,我不知道如何從雜食插件中集成此代碼.我為我的數據使用 geojson url $.getJSON,使用 Leaflet 的 MarkerCluster 聚類標記.

                  I try to make a map with mapbox and omnivore plugin of Leafet in order to search a data with the tutorial. I don't know how integrate this code from omnivore plugin in my case. I use for my datas a geojson url $.getJSON, clustering markers with MarkerCluster of Leaflet.

                  感謝您的回復.

                  最好的問候.

                  桑德琳

                  編輯

                  我嘗試使用 Mapbox js 工具過濾標記集群組.

                  I try to filter marker cluster group with Mapbox js tool.

                  效果很好,但我想將此功能插入到我的項目中.但我不知道如何使用其他功能:雜食插件,搜索數據,顯示彈出窗口,標記集群組.你能幫幫我嗎?

                  It works very well but I would like to insert this feature to my project. But I don't know how to make with the other features : omnivore plugin, search the data, displaying the popup, marker cluster group. Could you help me ?

                  我的 js Fiddle過濾標記集群組":https://jsfiddle.net/sduermael78/rgoxpxwq/4/

                  My js Fiddle "filtering marker cluster group" : https://jsfiddle.net/sduermael78/rgoxpxwq/4/

                  我的項目:https://jsfiddle.net/sduermael78/1uuubmwb/42/

                  推薦答案

                  您目前通過 jQuery $.getJSON 和直接從您的 mapbox 帳戶加載數據.

                  You currently load your data through both jQuery $.getJSON and directly from your mapbox account.

                  那么如果我的理解是正確的,你想用 leaflet-omnivore 插件?

                  Then if my understanding is correct, you would like to replace these methods by using leaflet-omnivore plugin?

                  直接替換非常簡單,您可以直接使用:

                  Direct replacement is quite straight forward, as you could directly use:

                  var geojsonLayer = omnivore.geojson("filePath", null, L.mapbox.featureLayer());
                  geojsonLayer.addTo(map);
                  

                  現在,當您想要對標記進行聚類時,它會變得稍微復雜一些(在您的情況下使用 Leaflet.markercluster 插件).但它類似于 $.getJSON 因為兩者都執行異步 AJAX 請求,并且您必須在回調中進行轉換.

                  Now it becomes slightly more complicated when you want to cluster your markers (using Leaflet.markercluster plugin in your case). But it is similar to $.getJSON since both perform an asynchronous AJAX request, and you have to make the conversion in a callback.

                  使用 Leaflet-omnivore,您可以使用 .on("ready", 回調) 語法:

                  With leaflet-omnivore, you use the .on("ready", callback) syntax:

                  var geojsonLayer = omnivore.geojson("filePath", null, L.mapbox.featureLayer())
                    .on("ready", function() {
                      var markers = L.markerClusterGroup();
                      markers.addLayer(geojsonLayer);
                      markers.addTo(mymap);
                    });
                  

                  更新的 JSFiddle:https://jsfiddle.net/1uuubmwb/39/

                  Updated JSFiddle: https://jsfiddle.net/1uuubmwb/39/

                  編輯

                  好的,我錯過了您在教程中想要搜索數據"的部分,如您指向的 mapbox 中所做的那樣.

                  OK I missed your part where you "want to search the data" as done in the tutorial from mapbox you point to.

                  在您的情況下,由于您想要對標記進行聚類,因此您沒有直接擁有 mapbox 要素圖層,而是擁有一個標記聚類組.

                  In your case it is more complicated as you want to cluster your markers, so you do not directly have your mapbox feature layer, but a marker cluster group.

                  解決方法是每次更改 geojsonLayer mapbox 要素圖層上的過濾條件時替換該集群組的內容:

                  A workaround would be to replace the content of that cluster group everytime you change the filtering condition on your geojsonLayer mapbox feature layer:

                  // this will "hide" markers that do not match the filter.
                  geojsonLayer.setFilter(showCode);
                  
                  // replace the content of marker cluster group.
                  markers.clearLayers();
                  markers.addLayer(geojsonLayer);
                  

                  然后對于您的彈出窗口,您必須手動創建并綁定它,因為 mapbox 要素圖層需要您的 GeoJSON 數據才能使用 title 屬性(如果是這樣,它會自動使用該信息來填充彈出/工具提示"內容):

                  Then for your popup, you have to create it and bind it manually, as mapbox feature layer needs your GeoJSON data to use the title attribute (if so, it automatically uses that info to fill the popup / "tooltip" content):

                  function attachPopups() {
                    // Create popups.
                      geojsonLayer.eachLayer(function (layer) {
                        var props = layer.feature.properties;
                  
                        layer.bindPopup(
                          "<b>Code unité&nbsp;:</b> " + props.CODE_UNITE + "<br />" +
                          "<b>Adresse web&nbsp;:</b> <a href='" + props.ADRESSE_WEB + "' target='_blank'>" + props.ADRESSE_WEB + "</a>"
                        );
                      });
                  }
                  

                  不幸的是,看起來 .setFilter() 刪除了該彈出窗口,因此您需要在每個 setFilterattachPopups() 函數>.

                  Unfortunately, it looks like .setFilter() removes that popup, so you would need to call this attachPopups() function after every setFilter.

                  演示:https://jsfiddle.net/1uuubmwb/40/

                  這篇關于傳單雜食+聚類標記+過濾標記聚類組的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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 圖層控件添加到側邊欄)
                    <bdo id='Zd5Ex'></bdo><ul id='Zd5Ex'></ul>

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

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

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

                    <tfoot id='Zd5Ex'></tfoot>

                          • 主站蜘蛛池模板: 基本型顶空进样器-全自动热脱附解吸仪价格-AutoHS全模式-成都科林分析技术有限公司 | 免费个人pos机申请办理-移动pos机刷卡-聚合收款码办理 | 制氮设备_PSA制氮机_激光切割制氮机_氮气机生产厂家-苏州西斯气体设备有限公司 | 传递窗_超净|洁净工作台_高效过滤器-传递窗厂家广州梓净公司 | 成都装修公司-成都装修设计公司推荐-成都朗煜装饰公司 | 高速龙门架厂家_监控杆_多功能灯杆_信号灯杆_锂电池太阳能路灯-鑫世源照明 | 烟气在线监测系统_烟气在线监测仪_扬尘检测仪_空气质量监测站「山东风途物联网」 | 日本细胞免疫疗法_肿瘤免疫治疗_NK细胞疗法 - 免疫密码 | 智能汉显全自动量热仪_微机全自动胶质层指数测定仪-鹤壁市科达仪器仪表有限公司 | pbt头梳丝_牙刷丝_尼龙毛刷丝_PP塑料纤维合成毛丝定制厂_广州明旺 | 实战IT培训机构_IT培训班选大学生IT技术培训中心_中公优就业 | 环氧铁红防锈漆_环氧漆_无溶剂环氧涂料_环氧防腐漆-华川涂料 | 温州中研白癜风专科_温州治疗白癜风_温州治疗白癜风医院哪家好_温州哪里治疗白癜风 | 巨野电机维修-水泵维修-巨野县飞宇机电维修有限公司 | 新疆乌鲁木齐网站建设-乌鲁木齐网站制作设计-新疆远璨网络 | 深圳南财多媒体有限公司介绍| 量子管通环-自清洗过滤器-全自动反冲洗过滤器-沼河浸过滤器 | hdpe土工膜-防渗膜-复合土工膜-长丝土工布价格-厂家直销「恒阳新材料」-山东恒阳新材料有限公司 ETFE膜结构_PTFE膜结构_空间钢结构_膜结构_张拉膜_浙江萬豪空间结构集团有限公司 | 沉降天平_沉降粒度仪_液体比重仪-上海方瑞仪器有限公司 | 东莞ERP软件_广州云ERP_中山ERP_台湾工厂erp系统-广东顺景软件科技有限公司 | 骨密度仪-骨密度测定仪-超声骨密度仪-骨龄测定仪-天津开发区圣鸿医疗器械有限公司 | 短信通106短信接口验证码接口群发平台_国际短信接口验证码接口群发平台-速度网络有限公司 | 上海小程序开发-小程序制作-上海小程序定制开发公司-微信商城小程序-上海咏熠 | 消泡剂_水处理消泡剂_切削液消泡剂_涂料消泡剂_有机硅消泡剂_广州中万新材料生产厂家 | 谷歌关键词优化-外贸网站优化-Google SEO小语种推广-思亿欧外贸快车 | 青岛侦探调查_青岛侦探事务所_青岛调查事务所_青岛婚外情取证-青岛狄仁杰国际侦探公司 | 淘趣英语网 - 在线英语学习,零基础英语学习网站 | 继电器模组-IO端子台-plc连接线-省配线模组厂家-世麦德 | 武汉创亿电气设备有限公司_电力检测设备生产厂家 | 组织研磨机-高通量组织研磨仪-实验室多样品组织研磨机-东方天净 传递窗_超净|洁净工作台_高效过滤器-传递窗厂家广州梓净公司 | 紫外可见光分光度计-紫外分光度计-分光光度仪-屹谱仪器制造(上海)有限公司 | 水厂自动化-水厂控制系统-泵站自动化|控制系统-闸门自动化控制-济南华通中控科技有限公司 | 香蕉筛|直线|等厚|弧形|振动筛|香蕉筛厂家-洛阳隆中重工 | 通风天窗,通风气楼,屋顶通风天窗,屋顶通风天窗公司 | 济南菜鸟驿站广告|青岛快递车车体|社区媒体-抖音|墙体广告-山东揽胜广告传媒有限公司 | 废气处理设备-工业除尘器-RTO-RCO-蓄热式焚烧炉厂家-江苏天达环保设备有限公司 | 四合院设计_四合院装修_四合院会所设计-四合院古建设计与建造中心1 | 长沙发电机-湖南发电机-柴油发电机供应厂家-长沙明邦智能科技 | 高效节能电机_伺服主轴电机_铜转子电机_交流感应伺服电机_图片_型号_江苏智马科技有限公司 | 爱佩恒温恒湿测试箱|高低温实验箱|高低温冲击试验箱|冷热冲击试验箱-您身边的模拟环境试验设备技术专家-合作热线:400-6727-800-广东爱佩试验设备有限公司 | 武汉天安盾电子设备有限公司 - 安盾安检,武汉安检门,武汉安检机,武汉金属探测器,武汉测温安检门,武汉X光行李安检机,武汉防爆罐,武汉车底安全检查,武汉液体探测仪,武汉安检防爆设备 |