久久久久久久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>

        如何找到最近的標記leaflet.js

        How to find closest marker leaflet.js(如何找到最近的標記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>
                  本文介紹了如何找到最近的標記leaflet.js的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我想知道是否真的有某種方法可以使用 Leaflet.js 在我的位置附近找到標記.我想到的第一個想法是存儲我的位置的 lat 和 lng,然后遍歷一組 lat 和 lng 標記,將它們放在一個數組中,然后對該數組進行排序.我不確定這是否是一個不錯的選擇,因為如果您在地圖上有一百萬個標記需要一段時間.

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

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

                  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,它進行最近鄰查找:給定一個點和一堆其他點,它會找到最近的鄰居(正如它在錫上所說的那樣)

                  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)

                  這篇關于如何找到最近的標記leaflet.js的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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 中的默認加載磁貼顏色?)
                  Adding Leaflet layer control to sidebar(將 Leaflet 圖層控件添加到側邊欄)
                  Leaflet - get latitude and longitude of a marker inside a pop-up(Leaflet - 在彈出窗口中獲取標記的緯度和經度)
                  <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>
                            主站蜘蛛池模板: 久久精品播放 | 91欧美激情一区二区三区成人 | 成人欧美一区二区三区视频xxx | 91传媒在线观看 | 在线精品亚洲欧美日韩国产 | 久久久精品一区 | 国产最新网址 | 国产午夜影院 | 天堂中文av| 韩日一区二区三区 | www日韩| 91成人在线 | 青青草视频网站 | 色站综合 | 亚洲成人午夜电影 | 狠狠久| 日韩成人av在线 | 日韩精品三区 | 一级免费毛片 | 久久99这里只有精品 | av av在线| 亚洲高清视频在线观看 | 亚洲www啪成人一区二区麻豆 | 国产成人在线一区二区 | 一区二区免费 | 亚洲欧美在线一区 | av一级久久| 亚洲福利av| 国产亚洲一区二区三区在线观看 | 一级毛片成人免费看a | 国产精品成人在线观看 | 天天射色综合 | 一区2区| 亚洲a一区 | 91视频一区二区三区 | 中文二区 | 国产伦精品一区二区三区精品视频 | 日本成人二区 | 亚洲精品一区二区三区四区高清 | 日韩专区中文字幕 | 日日操夜夜操天天操 |