久久久久久久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 的當前比例值的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  是否可以獲取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!

                  如果您只是想在其他地方復(fù)制"該 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.

                  否則,如果您希望能夠測量地圖上兩點之間的距離,您應(yīng)該使用 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

                  這篇關(guān)于檢索 Leaflet 的當前比例值的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                  相關(guā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>
                            主站蜘蛛池模板: 成人片在线播放 | 天天有av | 欧美不卡一区二区三区 | 91亚洲国产 | 亚洲一级免费视频 | 日本高清在线观看 | 国产精品不卡视频 | 日韩欧美第一页 | 久久久久国产一区二区三区 | 谁有毛片网站 | 国产天堂网 | 欧美成人一级 | 999国产视频 | 中文字字幕 | 不卡av在线播放 | www.日本高清| 成人福利片 | 黄色一级在线观看 | 久久精品在线 | 免费h片| 中文字幕在线观看免费视频 | 国产精品一区二区三区免费 | 久久精品欧美一区 | 色综合天天综合网国产成人网 | 欧美一区二区三区在线 | 成人免费网站黄 | 伊人久久国产 | 中文字幕在 | 色婷婷久久综合 | 在线色网站 | 91网在线| 久久久久久爱 | 成人福利| 国产亚洲欧美在线 | 天堂av影院 | 亚洲图片一区二区 | 日本丰满少妇裸体自慰 | 黑人巨大精品欧美一区二区 | 午夜视频在线免费观看 | 欧美日韩精品 | 日韩在线毛片 |