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

    1. <i id='yu3gc'><tr id='yu3gc'><dt id='yu3gc'><q id='yu3gc'><span id='yu3gc'><b id='yu3gc'><form id='yu3gc'><ins id='yu3gc'></ins><ul id='yu3gc'></ul><sub id='yu3gc'></sub></form><legend id='yu3gc'></legend><bdo id='yu3gc'><pre id='yu3gc'><center id='yu3gc'></center></pre></bdo></b><th id='yu3gc'></th></span></q></dt></tr></i><div class="3ftzxj5" id='yu3gc'><tfoot id='yu3gc'></tfoot><dl id='yu3gc'><fieldset id='yu3gc'></fieldset></dl></div>
    2. <legend id='yu3gc'><style id='yu3gc'><dir id='yu3gc'><q id='yu3gc'></q></dir></style></legend>
      <tfoot id='yu3gc'></tfoot>

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

        • <bdo id='yu3gc'></bdo><ul id='yu3gc'></ul>
      1. 傳單:更新 GeoJson 過濾器?

        Leaflet: Update GeoJson filter?(傳單:更新 GeoJson 過濾器?)
        <legend id='7xdsR'><style id='7xdsR'><dir id='7xdsR'><q id='7xdsR'></q></dir></style></legend>

        <tfoot id='7xdsR'></tfoot>

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

              <small id='7xdsR'></small><noframes id='7xdsR'>

                <bdo id='7xdsR'></bdo><ul id='7xdsR'></ul>
                • 本文介紹了傳單:更新 GeoJson 過濾器?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我想用數據填充 GeoJson 層,然后動態過濾要顯示的特征.

                  I would like to populate a GeoJson layer with data and then dynamically filter what features to show.

                  我已經讓過濾器功能工作,但我不知道如何更改過濾器然后刷新圖層.

                  I have gotten the filter function to work but I do not know how to change the filter and then refresh the layer.

                  添加數據后有什么方法可以更新過濾器?

                  Is there any way I can update the filter after I have added the data?

                  推薦答案

                  我通過將每個功能類型添加到不同的 LayerGroup 基于特征的屬性.例如

                  I did this by adding each feature type to a different LayerGroup based on a property of the feature. e.g.

                  GeoJSON

                  var data =[
                    {
                     type: "Feature",
                     properties: {
                        type: "type1"
                     },
                     geometry: {
                        type: "Point",
                        coordinates: [-1.252,52.107]
                     }
                    },
                    {
                     type: "Feature",
                     properties: {
                        type: "type2"
                     },
                     geometry: {
                        type: "Point",
                        coordinates: [-2.252,54.107]
                     }
                    }
                  ];
                  

                  創建 GeoJSON 層

                  //array to store layers for each feature type
                  var mapLayerGroups = [];
                  
                  //draw GEOJSON - don't add the GEOJSON layer to the map here
                  L.geoJson(data, {onEachFeature: onEachFeature})//.addTo(map);
                  
                  /*
                   *for all features create a layerGroup for each feature type and add the feature to the    layerGroup
                  */
                  function onEachFeature(feature, featureLayer) {
                  
                      //does layerGroup already exist? if not create it and add to map
                      var lg = mapLayerGroups[feature.properties.type];
                  
                      if (lg === undefined) {
                          lg = new L.layerGroup();
                          //add the layer to the map
                          lg.addTo(map);
                          //store layer
                          mapLayerGroups[feature.properties.type] = lg;
                      }
                  
                      //add the feature to the layer
                      lg.addLayer(featureLayer);      
                  }
                  

                  然后您可以調用 Leaflet map.addLayer/removeLayer 函數,例如

                  Then you can call the Leaflet map.addLayer/removeLayer functions e.g.

                  //Show layerGroup with feature of "type1"
                  showLayer("type1");
                  
                  /*
                  * show/hide layerGroup   
                  */
                  function showLayer(id) {
                      var lg = mapLayerGroups[id];
                      map.addLayer(lg);   
                  }
                  function hideLayer(id) {
                      var lg = mapLayerGroups[id];
                      map.removeLayer(lg);   
                  }
                  

                  這篇關于傳單:更新 GeoJson 過濾器?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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='xe3GL'></bdo><ul id='xe3GL'></ul>

                      1. <tfoot id='xe3GL'></tfoot>
                        <legend id='xe3GL'><style id='xe3GL'><dir id='xe3GL'><q id='xe3GL'></q></dir></style></legend>
                        <i id='xe3GL'><tr id='xe3GL'><dt id='xe3GL'><q id='xe3GL'><span id='xe3GL'><b id='xe3GL'><form id='xe3GL'><ins id='xe3GL'></ins><ul id='xe3GL'></ul><sub id='xe3GL'></sub></form><legend id='xe3GL'></legend><bdo id='xe3GL'><pre id='xe3GL'><center id='xe3GL'></center></pre></bdo></b><th id='xe3GL'></th></span></q></dt></tr></i><div class="npx9ttz" id='xe3GL'><tfoot id='xe3GL'></tfoot><dl id='xe3GL'><fieldset id='xe3GL'></fieldset></dl></div>

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

                              <tbody id='xe3GL'></tbody>
                            主站蜘蛛池模板: hdpe土工膜-防渗膜-复合土工膜-长丝土工布价格-厂家直销「恒阳新材料」-山东恒阳新材料有限公司 ETFE膜结构_PTFE膜结构_空间钢结构_膜结构_张拉膜_浙江萬豪空间结构集团有限公司 | 岸电电源-60HZ变频电源-大功率变频电源-济南诚雅电子科技有限公司 | 垃圾处理设备_餐厨垃圾处理设备_厨余垃圾处理设备_果蔬垃圾处理设备-深圳市三盛环保科技有限公司 | 工业铝型材-铝合金电机壳-铝排-气动执行器-山东永恒能源集团有限公司 | 噪声治理公司-噪音治理专业隔音降噪公司 | 异噻唑啉酮-均三嗪-三丹油-1227-中北杀菌剂厂家 | 旋转气浴恒温振荡器-往复式水浴恒温振荡器-金怡百科 | 重庆轻质隔墙板-重庆安吉升科技有限公司| 撕碎机_轮胎破碎机_粉碎机_回收生产线厂家_东莞华达机械有限公司 | 天津次氯酸钠酸钙溶液-天津氢氧化钠厂家-天津市辅仁化工有限公司 | 领先的大模型技术与应用公司-中关村科金 | 全自动面膜机_面膜折叠机价格_面膜灌装机定制_高速折棉机厂家-深圳市益豪科技有限公司 | 影像测量仪_三坐标测量机_一键式二次元_全自动影像测量仪-广东妙机精密科技股份有限公司 | 升降机-高空作业车租赁-蜘蛛车-曲臂式伸缩臂剪叉式液压升降平台-脚手架-【普雷斯特公司厂家】 | POS机官网 - 拉卡拉POS机免费办理|官网在线申请入口 | 定制防伪标签_防伪标签印刷_防伪标签厂家-510品保防伪网 | 湖南教师资格网-湖南教师资格证考试网 | 冷油器,取样冷却器,热力除氧器-连云港振辉机械设备有限公司 | 新能源汽车教学设备厂家报价[汽车教学设备运营18年]-恒信教具 | 深圳公司注册-工商注册公司-千百顺代理记账公司 | 杭州代理记账费用-公司注销需要多久-公司变更监事_杭州福道财务管理咨询有限公司 | 洗瓶机厂家-酒瓶玻璃瓶冲瓶机-瓶子烘干机-封口旋盖压盖打塞机_青州惠联灌装机械 | 溶氧传感器-pH传感器|哈美顿(hamilton)| 北京翻译公司-专业合同翻译-医学标书翻译收费标准-慕迪灵 | TTCMS自助建站_网站建设_自助建站_免费网站_免费建站_天天向上旗下品牌 | PVC快速门-硬质快速门-洁净室快速门品牌厂家-苏州西朗门业 | 带锯机|木工带锯机圆木推台锯|跑车带锯机|河北茂业机械制造有限公司| | 不锈钢拉手厂家|浴室门拉手厂家|江门市蓬江区金志翔五金制品有限公司 | 丹佛斯压力传感器,WISE温度传感器,WISE压力开关,丹佛斯温度开关-上海力笙工业设备有限公司 | 耐酸碱泵-自吸耐酸碱泵型号「品牌厂家」立式耐酸碱泵价格-昆山国宝过滤机有限公司首页 | 联系我们-腾龙公司上分客服微信19116098882 | 牛皮纸|牛卡纸|进口牛皮纸|食品级牛皮纸|牛皮纸厂家-伽立实业 | 糖衣机,除尘式糖衣机,全自动糖衣机,泰州市长江制药机械有限公司 体感VRAR全息沉浸式3D投影多媒体展厅展会游戏互动-万展互动 | 葡萄酒灌装机-食用油灌装机-液体肥灌装设备厂家_青州惠联灌装机械 | 铁艺,仿竹,竹节,护栏,围栏,篱笆,栅栏,栏杆,护栏网,网围栏,厂家 - 河北稳重金属丝网制品有限公司 山东太阳能路灯厂家-庭院灯生产厂家-济南晟启灯饰有限公司 | 沈阳网站建设_沈阳网站制作_沈阳网页设计-做网站就找示剑新零售 沈阳缠绕膜价格_沈阳拉伸膜厂家_沈阳缠绕膜厂家直销 | 硅胶布|电磁炉垫片|特氟龙胶带-江苏浩天复合材料有限公司 | 贵州成人高考网_贵州成考网 | 物流之家新闻网-最新物流新闻|物流资讯|物流政策|物流网-匡匡奈斯物流科技 | 龙门加工中心-数控龙门加工中心厂家价格-山东海特数控机床有限公司_龙门加工中心-数控龙门加工中心厂家价格-山东海特数控机床有限公司 | 氧化锆陶瓷_氧化锆陶瓷加工_氧化锆陶瓷生产厂家-康柏工业陶瓷有限公司 |