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

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

    1. <legend id='LCJxC'><style id='LCJxC'><dir id='LCJxC'><q id='LCJxC'></q></dir></style></legend>
    2. <small id='LCJxC'></small><noframes id='LCJxC'>

          <bdo id='LCJxC'></bdo><ul id='LCJxC'></ul>
      1. <tfoot id='LCJxC'></tfoot>

        在 Leaflet 中獲取當前地圖范圍內的標記/圖層列表

        Get a list of markers/layers within current map bounds in Leaflet(在 Leaflet 中獲取當前地圖范圍內的標記/圖層列表)
        <legend id='lVoaT'><style id='lVoaT'><dir id='lVoaT'><q id='lVoaT'></q></dir></style></legend>

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

            <tbody id='lVoaT'></tbody>

            <bdo id='lVoaT'></bdo><ul id='lVoaT'></ul>
                <tfoot id='lVoaT'></tfoot>

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

                • 本文介紹了在 Leaflet 中獲取當前地圖范圍內的標記/圖層列表的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  這有點類似于這里提出的問題--

                  我正在為地圖應用程序編寫一個搜索框,該應用程序從服務器一次檢索一整套搜索結果(人名和信息),然后翻閱結果列表.因此,在地圖上的任何給定點,都有兩種標記 - 背景標記用于在搜索結果中但不在當前頁面中的點,以及用于在當前搜索結果頁面中的點的前景標記.

                  I'm writing a search box for a map application, which retrieves a whole set of search results (people's names & info) at once from a server and then pages through the list of results. So at any given point on the map there are two kinds of markers -- a background marker for points which are in the search results but not in the current page, and a foreground marker for points which are in the current page of search results.

                  所有這一切都很好.我現在想做的是設置它,以便如果用戶縮放或平移地圖,搜索結果列表會更新以僅顯示當前地圖范圍內的標記.

                  All this works nicely.. what I'd like to do now is set it up so that if a user zooms or pans the map, the search results list updates to show only markers within the current map bounds.

                  顯然有服務器端的方法可以做到這一點,或者我也可以遍歷整個標記列表,看看哪些符合當前范圍;但是有人知道在傳單中執行此操作的內置方法嗎?看起來像 map.getVisibleLayers() 的東西?

                  Obviously there are server-side ways to do this, or I could also just run through the whole list of markers to see which fit within the current bounds; but does anybody know a built-in way to do this within leaflet? Something which would look like map.getVisibleLayers()?

                  推薦答案

                  我認為這可能會有所幫助:https://github.com/stefanocudini/leaflet-list-markers

                  I think this may be of help: https://github.com/stefanocudini/leaflet-list-markers

                  從演示中可以看出,包括圖層中的所有標記,此插件僅顯示當前視口中可見的標記列表.它的用法很簡單,連續:

                  as you can see from the demo, including all markers in a layer, this plugin shows a list of only those visible in the current viewport. Its usage is simple, in a row:

                  var markersLayer = new L.LayerGroup();
                  map.addControl( new L.Control.ListMarkers({layer: markersLayer}) );
                  

                  獲取代碼如下:

                  var layers = L.LayerGroup(), //layers contains all markers..
                      contained = [];          //makers in map boundingbox
                  
                  layers.eachLayer(function(l) {
                      if( l instanceof L.Marker && map.getBounds().contains(l.getLatLng()) )
                          contained.push(l);
                  });
                  

                  這篇關于在 Leaflet 中獲取當前地圖范圍內的標記/圖層列表的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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 圖層控件添加到側邊欄)

                • <tfoot id='6iV7V'></tfoot>

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

                          <tbody id='6iV7V'></tbody>
                        1. <small id='6iV7V'></small><noframes id='6iV7V'>

                          1. 主站蜘蛛池模板: 偷拍第一页 | 国产一级在线观看 | av在线播放一区二区 | 一级a性色生活片久久毛片 午夜精品在线观看 | 亚洲视频在线观看一区二区三区 | 黄色一级片视频 | 国产精品久久久久久久 | 欧美精品在欧美一区二区少妇 | 中文字幕爱爱视频 | 91精品国产一区二区三区 | 99精品久久久久久 | h片在线观看网站 | 中文字幕在线中文 | 国产精品夜夜夜一区二区三区尤 | 色婷婷国产精品综合在线观看 | 欧美一区久久 | 日韩精品区 | 久久国产精品久久国产精品 | 日韩午夜场 | 欧美激情欧美激情在线五月 | 国产精品777一区二区 | 91日韩| 精产国产伦理一二三区 | 青青草av网站 | 国产精品高清一区二区三区 | 亚洲精品视频一区 | 国产精品毛片一区二区在线看 | 久久毛片| 亚洲国产免费 | 久久久网 | 精品福利在线 | 91色视频在线观看 | 欧美男人天堂 | 亚洲成人久久久 | 精品国偷自产在线 | 一级黄在线观看 | 黑人精品欧美一区二区蜜桃 | 国产a级毛毛片 | 国产99久久精品一区二区永久免费 | 精国产品一区二区三区 | 日韩一区二区三区精品 |