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

    • <bdo id='KQ6EO'></bdo><ul id='KQ6EO'></ul>

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

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

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

        如何找到最近的標(biāo)記leaflet.js

        How to find closest marker leaflet.js(如何找到最近的標(biāo)記leaflet.js)

          <bdo id='eA1oO'></bdo><ul id='eA1oO'></ul>
          <legend id='eA1oO'><style id='eA1oO'><dir id='eA1oO'><q id='eA1oO'></q></dir></style></legend>

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

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

                1. <tfoot id='eA1oO'></tfoot>

                    <tbody id='eA1oO'></tbody>
                  本文介紹了如何找到最近的標(biāo)記leaflet.js的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  我想知道是否真的有某種方法可以使用 Leaflet.js 在我的位置附近找到標(biāo)記.我想到的第一個(gè)想法是存儲(chǔ)我的位置的 lat 和 lng,然后遍歷一組 lat 和 lng 標(biāo)記,將它們放在一個(gè)數(shù)組中,然后對(duì)該數(shù)組進(jìn)行排序.我不確定這是否是一個(gè)不錯(cuò)的選擇,因?yàn)槿绻诘貓D上有一百萬個(gè)標(biāo)記需要一段時(shí)間.

                  I was wondering if there is actually some way to find markers near my position using leaflet.js. The first think to come to my head is to store lat and lng of my position and then iterate over an array of lat and lng markers placing them in an array an then sort that array. I am not sure if this is a good option because if you have a million markers in the map is going to take a while.

                  偽代碼

                  var myLatLng = [34,56];
                  var markers = [[20,30],[10,20],[12,-100],[54,90],[-10, -20],[20,20]];
                  var closests = [];
                  function findNearestMarker (myPosition, nearestMarkers){
                   for(var i = 0; i < nearestMarkers.length){
                       if((nearestMarkers[i][0] - myPosition[0]) < 100 && (nearestMarkers[i][1] - myPosition[1]) < 100 ){
                           closests.push(nearestMarkers[i])
                       }
                   }
                  }
                  

                  我實(shí)際上是從地圖開始,不知道這么多方法,我也想在這個(gè)項(xiàng)目中使用開放的街道地圖,但是,如果有人知道并使用谷歌地圖或其他服務(wù),我將受到歡迎.

                  I am actually starting with maps and dont know so many approaches, I will also like to use open street maps for this project, but, if someone know and aproach using google maps or another services it will be welcomed.

                  推薦答案

                  試試leaflet-knn,它進(jìn)行最近鄰查找:給定一個(gè)點(diǎn)和一堆其他點(diǎn),它會(huì)找到最近的鄰居(正如它在錫上所說的那樣)

                  Try leaflet-knn, which does nearest-neighbor lookups: given a point and a bunch of other points, it finds the nearest neighbors (as it says on the tin)

                  這篇關(guān)于如何找到最近的標(biāo)記leaflet.js的文章就介紹到這了,希望我們推薦的答案對(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)加載磁貼顏色?)
                  Adding Leaflet layer control to sidebar(將 Leaflet 圖層控件添加到側(cè)邊欄)
                  Leaflet - get latitude and longitude of a marker inside a pop-up(Leaflet - 在彈出窗口中獲取標(biāo)記的緯度和經(jīng)度)
                  <legend id='LFpyO'><style id='LFpyO'><dir id='LFpyO'><q id='LFpyO'></q></dir></style></legend>
                    <tbody id='LFpyO'></tbody>

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

                            <tfoot id='LFpyO'></tfoot>
                            主站蜘蛛池模板: 色片在线观看 | 国产精品免费视频一区 | 国产精品18hdxxxⅹ在线 | 久久99视频这里只有精品 | 国产一区二区三区久久久久久久久 | 国产精品久久久久久吹潮 | 午夜激情视频在线 | 国产1区在线| 国产在线一区二区三区 | 亚洲精品久久久久中文字幕欢迎你 | 色毛片| 日韩一区和二区 | 成人h视频在线观看 | 四虎伊人 | 欧美一区二区三区在线播放 | 超碰8| 欧美1—12sexvideos | 成人欧美一区二区 | 91在线中文字幕 | 精品久久久久久久久久久久久久 | 精品一区二区在线观看 | 精品九九 | 北条麻妃99精品青青久久主播 | 天堂网中文| 欧美aaaaaaaaaa | 日韩中文在线视频 | www312aⅴ欧美在线看 | 国产欧美日韩精品一区 | 久久久久国产精品一区三寸 | 精品一区av | 久草欧美视频 | 国产精品视频一区二区三区 | 麻豆a级片 | 欧美www在线 | 欧美成人精品一区二区男人看 | 福利视频日韩 | 午夜精品一区二区三区在线观看 | 成人三级视频 | 欧美日韩国产在线观看 | 亚洲精品在线看 | av一二三四 |