久久久久久久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 英里".現(xiàn)有文檔僅顯示如何使用特定選項添加比例控制: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 比例,您可以簡單地創(chuàng)建另一個 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)
                  );
                  

                  如果您想讀取縮放控件的實際像素長度和文本,您可以通過內(nèi)部 _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模板網(wǎng)!

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

                  相關文檔推薦

                  Check if a polygon point is inside another in leaflet(檢查一個多邊形點是否在傳單中的另一個內(nèi)部)
                  Changing leaflet markercluster icon color, inheriting the rest of the default CSS properties(更改傳單標記群集圖標顏色,繼承其余默認 CSS 屬性)
                  Trigger click on leaflet marker(觸發(fā)點擊傳單標記)
                  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 圖層控件添加到側(cè)邊欄)
                    <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>
                            主站蜘蛛池模板: 久久99视频精品 | 亚洲在线一区 | 日本精品一区二区三区视频 | 日本不卡在线观看 | 精品三级| 日韩欧美在线视频播放 | 欧美黑人狂野猛交老妇 | 国产精品69毛片高清亚洲 | 亚洲激情综合 | 精品真实国产乱文在线 | 黄色在线观看国产 | 福利久久 | 九九热在线视频免费观看 | www.4567| 中文字幕精品一区二区三区精品 | 日本一区二区高清视频 | 91精品久久久久久久久 | 久久高清免费视频 | 亚洲精品视频网站在线观看 | 99久久久无码国产精品 | 欧美福利在线 | 日韩精品一区二区三区中文在线 | 精品美女在线观看视频在线观看 | 一二三区av | 毛片一区二区三区 | 黄色一级大片视频 | 99久久国产综合精品麻豆 | 国产 欧美 日韩 一区 | 日日日日操 | 免费观看一级毛片视频 | 亚洲美女天堂网 | 亚洲国产一区在线 | 美女三区 | 黄色播放 | 在线观看日本高清二区 | 中文成人无字幕乱码精品 | 欧美日韩一区二区三区不卡视频 | 色综合一区二区三区 | av在线天堂网 | 国产福利在线小视频 | 亚洲男女视频在线观看 |