久久久久久久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 中獲取當(dāng)前地圖范圍內(nèi)的標(biāo)記/圖層列表

        Get a list of markers/layers within current map bounds in Leaflet(在 Leaflet 中獲取當(dāng)前地圖范圍內(nèi)的標(biāo)記/圖層列表)
        <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 中獲取當(dāng)前地圖范圍內(nèi)的標(biāo)記/圖層列表的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  這有點(diǎn)類似于這里提出的問題--

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

                  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.

                  所有這一切都很好.我現(xiàn)在想做的是設(shè)置它,以便如果用戶縮放或平移地圖,搜索結(jié)果列表會(huì)更新以僅顯示當(dāng)前地圖范圍內(nèi)的標(biāo)記.

                  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.

                  顯然有服務(wù)器端的方法可以做到這一點(diǎn),或者我也可以遍歷整個(gè)標(biāo)記列表,看看哪些符合當(dāng)前范圍;但是有人知道在傳單中執(zhí)行此操作的內(nèi)置方法嗎?看起來像 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()?

                  推薦答案

                  我認(rèn)為這可能會(huì)有所幫助:https://github.com/stefanocudini/leaflet-list-markers

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

                  從演示中可以看出,包括圖層中的所有標(biāo)記,此插件僅顯示當(dāng)前視口中可見的標(biāo)記列表.它的用法很簡(jiǎn)單,連續(xù):

                  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);
                  });
                  

                  這篇關(guān)于在 Leaflet 中獲取當(dāng)前地圖范圍內(nèi)的標(biāo)記/圖層列表的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  Check if a polygon point is inside another in leaflet(檢查一個(gè)多邊形點(diǎn)是否在傳單中的另一個(gè)內(nèi)部)
                  Changing leaflet markercluster icon color, inheriting the rest of the default CSS properties(更改傳單標(biāo)記群集圖標(biāo)顏色,繼承其余默認(rèn) CSS 屬性)
                  Trigger click on leaflet marker(觸發(fā)點(diǎn)擊傳單標(biāo)記)
                  How can I change the default loading tile color in LeafletJS?(如何更改 LeafletJS 中的默認(rèn)加載磁貼顏色?)
                  Add external geojson to leaflet layer(將外部geojson添加到傳單層)
                  Adding Leaflet layer control to sidebar(將 Leaflet 圖層控件添加到側(cè)邊欄)

                • <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网站 | 久久精品黄色 | 国产精品毛片无码 | 欧美一级特黄aaa大片在线观看 | 国产精品99久久久久久动医院 | 暴草美女 | 成人精品久久 | 日韩在线一区二区 | 色男人的天堂 | 91国在线观看 | 午夜寂寞福利视频 | 91视在线国内在线播放酒店 | 麻豆国产一区二区三区四区 | 国产婷婷色一区二区三区 | 国产精品久久久久久久久久久免费看 | 午夜精品久久久久久久星辰影院 | av免费网址 | 久久成人一区二区三区 | 日韩欧美在线免费观看 | 一区二区播放 | 欧美一区二区三区视频 | 日韩精品免费在线 | 在线观看免费av网 | 亚洲精品久久久久久久久久久 | 超碰97人人人人人蜜桃 | 97av视频| 亚洲啪啪一区 | 人人九九精 | 成人精品一区亚洲午夜久久久 | 欧美综合一区二区三区 | 亚洲第一视频网 | 久久久一区二区三区 | 国产激情一区二区三区 | 精品国产一区二区三区性色av | 秋霞a级毛片在线看 | 日韩一二三区 | 91久久精品国产 | 羞羞的视频在线观看 |