pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

    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="ggsiwue" 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="my8w8kc" 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="qqeycwy" id='q5IlY'><tfoot id='q5IlY'></tfoot><dl id='q5IlY'><fieldset id='q5IlY'></fieldset></dl></div>

                            <tfoot id='q5IlY'></tfoot>
                            主站蜘蛛池模板: LOGO设计_品牌设计_VI设计 - 特创易 | 谷梁科技| 有声小说,听书,听小说资源库-听世界网 | 安德建奇火花机-阿奇夏米尔慢走丝|高维|发那科-北京杰森柏汇 | 上海网站建设-上海网站制作-上海网站设计-上海做网站公司-咏熠软件 | 北京租车公司_汽车/客车/班车/大巴车租赁_商务会议/展会用车/旅游大巴出租_北京桐顺创业租车公司 | 西装定制/做厂家/公司_西装订做/制价格/费用-北京圣达信西装 | 运动木地板厂家,篮球场木地板品牌,体育场馆木地板安装 - 欧氏运动地板 | 镀锌角钢_槽钢_扁钢_圆钢_方矩管厂家_镀锌花纹板-海邦钢铁(天津)有限公司 | 微量水分测定仪_厂家_卡尔费休微量水分测定仪-淄博库仑 | 扬子叉车厂家_升降平台_电动搬运车|堆高车-扬子仓储叉车官网 | 【ph计】|在线ph计|工业ph计|ph计厂家|ph计价格|酸度计生产厂家_武汉吉尔德科技有限公司 | 美国查特CHART MVE液氮罐_查特杜瓦瓶_制造全球品质液氮罐 | 江西自考网-江西自学考试网 | 杭州代理记账费用-公司注销需要多久-公司变更监事_杭州福道财务管理咨询有限公司 | 彼得逊采泥器-定深式采泥器-电动土壤采样器-土壤样品风干机-常州索奥仪器制造有限公司 | 微妙网,专业的动画师、特效师、CG模型设计师网站! - wmiao.com 超声波电磁流量计-液位计-孔板流量计-料位计-江苏信仪自动化仪表有限公司 | 固诺家居-全屋定制十大品牌_整体衣柜木门橱柜招商加盟 | 即用型透析袋,透析袋夹子,药敏纸片,L型涂布棒-上海桥星贸易有限公司 | 苏商学院官网 - 江苏地区唯一一家企业家自办的前瞻型、实操型商学院 | 爱佩恒温恒湿测试箱|高低温实验箱|高低温冲击试验箱|冷热冲击试验箱-您身边的模拟环境试验设备技术专家-合作热线:400-6727-800-广东爱佩试验设备有限公司 | 车牌识别道闸_停车场收费系统_人脸识别考勤机_速通门闸机_充电桩厂家_中全清茂官网 | 法兰连接型电磁流量计-蒸汽孔板节流装置流量计-北京凯安达仪器仪表有限公司 | 新密高铝耐火砖,轻质保温砖价格,浇注料厂家直销-郑州荣盛窑炉耐火材料有限公司 | 游戏版号转让_游戏资质出售_游戏公司转让-【八九买卖网】 | 蚂蚁分类信息系统 - PHP同城分类信息系统 - MayiCMS | Honsberg流量计-Greisinger真空表-气压计-上海欧臻机电设备有限公司 | 酒水灌装机-白酒灌装机-酒精果酒酱油醋灌装设备_青州惠联灌装机械 | 塑料撕碎机_编织袋撕碎机_废纸撕碎机_生活垃圾撕碎机_废铁破碎机_河南鑫世昌机械制造有限公司 | 短信通106短信接口验证码接口群发平台_国际短信接口验证码接口群发平台-速度网络有限公司 | 苏州同创电子有限公司 - 四探针测试仪源头厂家 | 预制舱-电力集装箱预制舱-模块化预制舱生产厂家-腾达电器设备 | 安规_综合测试仪,电器安全性能综合测试仪,低压母线槽安规综合测试仪-青岛合众电子有限公司 | 佛山市德信昌电子有限公司| 焊接烟尘净化器__焊烟除尘设备_打磨工作台_喷漆废气治理设备 -催化燃烧设备 _天津路博蓝天环保科技有限公司 | 菏泽商标注册_菏泽版权登记_商标申请代理_菏泽商标注册去哪里 | 塑胶跑道施工-硅pu篮球场施工-塑胶网球场建造-丙烯酸球场材料厂家-奥茵 | 清管器,管道清管器,聚氨酯发泡球,清管球 - 承德嘉拓设备 | pos机办理,智能/扫码/二维码/微信支付宝pos机-北京万汇通宝商贸有限公司 | 智慧物联网行业一站式解决方案提供商-北京东成基业 | 拼装地板,悬浮地板厂家,悬浮式拼装运动地板-石家庄博超地板科技有限公司 |