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

    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="qwawimqqmiuu" 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="qwawimqqmiuu" 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="qwawimqqmiuu" 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>
                            主站蜘蛛池模板: 日韩精品一区二区三区中文在线 | 亚洲视屏| 欧美黑人一区 | 天天色综网 | 在线观看成人小视频 | 亚洲欧美一区二区在线观看 | 精品99爱视频在线观看 | 一区二区三区四区在线视频 | 精品国产一区二区三区久久久蜜月 | 亚洲精品国产成人 | 99久久国产综合精品麻豆 | 一区二区三区不卡视频 | 国产女人与拘做受免费视频 | 国产精品亚洲精品日韩已方 | 久久精品二区亚洲w码 | 午夜成人免费视频 | 99re国产精品 | 亚洲九九精品 | 日韩免费视频一区二区 | 玖玖在线免费视频 | 精品少妇v888av| 亚洲九九| 日本亚洲精品成人欧美一区 | 亚洲精品乱码8久久久久久日本 | 黄网站免费在线观看 | 欧美aaaaaa| 少妇午夜一级艳片欧美精品 | 久久久久91| 亚洲一av| 国产综合精品一区二区三区 | 欧美中文字幕在线观看 | 欧美成人a∨高清免费观看 91伊人 | 蜜桃av鲁一鲁一鲁一鲁 | 精品国产第一区二区三区 | 亚洲视频在线播放 | 狠狠伊人 | 97精品国产| 九九国产| 国产在线视频一区二区 | 久久国产精品亚洲 | 黄在线免费观看 |