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

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

      <legend id='A87Dc'><style id='A87Dc'><dir id='A87Dc'><q id='A87Dc'></q></dir></style></legend>

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

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

        檢索 Leaflet 的當前比例值

        Retrieve current scale value of Leaflet(檢索 Leaflet 的當前比例值)
          <tbody id='wUVwE'></tbody>
        <tfoot id='wUVwE'></tfoot>
          <bdo id='wUVwE'></bdo><ul id='wUVwE'></ul>

            • <small id='wUVwE'></small><noframes id='wUVwE'>

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

                  <legend id='wUVwE'><style id='wUVwE'><dir id='wUVwE'><q id='wUVwE'></q></dir></style></legend>

                  本文介紹了檢索 Leaflet 的當前比例值的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  是否可以獲取Leaflet組件當前的縮放值?

                  Is it possible to get the current scale value of the Leaflet component?

                  上圖顯示了我想通過某種方法檢索的300 公里"或100 英里".現有文檔僅顯示如何使用特定選項添加比例控制:http://leafletjs.com/reference.html#control-scale

                  The image above shows "300 km" or "100 miles" that i would like to retrieve by a method. The existing documentation does only show how to add the scale control with specific options: http://leafletjs.com/reference.html#control-scale

                  推薦答案

                  在低縮放級別(當你看到世界的很大一部分時)小心縮放.

                  Be careful with the scale at low zoom levels (when you see a large portion of the world).

                  您看到的比例實際上對地圖視圖的中心水平線有效.地圖的一角,它所在的位置,甚至有點不對勁!

                  The scale that you see is actually valid for the center horizontal line of your map view. It is even slightly wrong for the corner of the map, where it is placed!

                  如果您只是想在其他地方復制"該 visual 比例,您可以簡單地創建另一個 Scale Control 并提取其 HTML 容器,而不是將其嵌入到您的地圖中:

                  If you just want to "duplicate" that visual scale somewhere else, you could simply create another Scale Control and extract its HTML container instead of embedding it to your map:

                  document.getElementById("myNewContainerId").appendChild(
                      L.control.scale(options).onAdd(map)
                  );
                  

                  如果您想讀取縮放控件的實際像素長度和文本,您可以通過內部 _mScale.style.width_mScale.innerHTML 屬性檢索它們的比例控制.如果您想要英制值而不是公制值,請將 _mScale 替換為 _iScale.

                  If you want to read the actual pixel length and text of the Scale Control, you could retrieve them through the internal _mScale.style.width and _mScale.innerHTML properties of the Scale Control. Replace _mScale by _iScale if you want the imperial values instead of the metric ones.

                  否則,如果您希望能夠測量地圖上兩點之間的距離,您應該使用 myLatLng.distanceTo(otherLatLng) 方法,這將更加準確,因為它不僅會在 myLatLng 實際使用正確的比例緯度,但如果將其放置在不同的緯度,也可以糾正沿 otherLatLng 路徑可能存在的不同比例.

                  Otherwise, if you want to be able to measure some distance between 2 points on the map, you should rather use the myLatLng.distanceTo(otherLatLng) method, which would be far more accurate, as it would not only use the correct scale at the myLatLng actual latitude, but also correct for the possible different scale along the path to otherLatLng if it is placed at a different latitude.

                  返回到使用 Haversine 公式計算的給定 LatLng 的距離(以米為單位).請參閱 維基百科上的說明

                  Returns the distance (in meters) to the given LatLng calculated using the Haversine formula. See description on wikipedia

                  這篇關于檢索 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 圖層控件添加到側邊欄)
                    <legend id='q5IlY'><style id='q5IlY'><dir id='q5IlY'><q id='q5IlY'></q></dir></style></legend>
                    • <bdo id='q5IlY'></bdo><ul id='q5IlY'></ul>
                        <tbody id='q5IlY'></tbody>

                    • <small id='q5IlY'></small><noframes id='q5IlY'>

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

                            <tfoot id='q5IlY'></tfoot>
                            主站蜘蛛池模板: 日本精品一区二区三区在线观看视频 | 成人精品鲁一区一区二区 | 欧美xxxx性xxxxx高清 | 国产欧美日韩一区二区三区在线观看 | 羞羞视频在线免费 | 色婷婷亚洲国产女人的天堂 | 国产一区二区三区视频 | 久久久毛片 | 欧洲精品一区 | 免费 视频 1级 | 一本岛道一二三不卡区 | 欧美在线高清 | 四虎在线播放 | 岛国av在线免费观看 | 人人爽人人爽人人片av | 国产免费福利小视频 | 日韩成人精品视频 | 欧美在线a| 日日骚网| 国产精品a免费一区久久电影 | 一区二区三区四区av | 亚洲国产成人久久久 | 亚洲精品一区二区三区丝袜 | 亚洲资源在线 | 国产黄色大片网站 | 一区二区三区av | 天色综合网| 在线观看免费av网 | 男人的天堂在线视频 | 一区二区三区高清 | 日韩性在线 | 欧美精品一区二区在线观看 | 噜噜噜噜狠狠狠7777视频 | 日韩免费高清视频 | 99久久精品一区二区成人 | 亚洲狠狠爱 | jizz18国产 | 久久久久亚洲精品 | 国产精品一区网站 | 国产一区免费 | 国产精品日韩欧美一区二区三区 |