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

<tfoot id='4hj0u'></tfoot>
  • <small id='4hj0u'></small><noframes id='4hj0u'>

    <legend id='4hj0u'><style id='4hj0u'><dir id='4hj0u'><q id='4hj0u'></q></dir></style></legend>
    1. <i id='4hj0u'><tr id='4hj0u'><dt id='4hj0u'><q id='4hj0u'><span id='4hj0u'><b id='4hj0u'><form id='4hj0u'><ins id='4hj0u'></ins><ul id='4hj0u'></ul><sub id='4hj0u'></sub></form><legend id='4hj0u'></legend><bdo id='4hj0u'><pre id='4hj0u'><center id='4hj0u'></center></pre></bdo></b><th id='4hj0u'></th></span></q></dt></tr></i><div class="comaw20" id='4hj0u'><tfoot id='4hj0u'></tfoot><dl id='4hj0u'><fieldset id='4hj0u'></fieldset></dl></div>
        <bdo id='4hj0u'></bdo><ul id='4hj0u'></ul>

        地圖上的傳單固定大小圓圈

        leaflet fixed size circle on map(地圖上的傳單固定大小圓圈)

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

              <tbody id='J8kmo'></tbody>

              <legend id='J8kmo'><style id='J8kmo'><dir id='J8kmo'><q id='J8kmo'></q></dir></style></legend>
                <bdo id='J8kmo'></bdo><ul id='J8kmo'></ul>

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

                <i id='J8kmo'><tr id='J8kmo'><dt id='J8kmo'><q id='J8kmo'><span id='J8kmo'><b id='J8kmo'><form id='J8kmo'><ins id='J8kmo'></ins><ul id='J8kmo'></ul><sub id='J8kmo'></sub></form><legend id='J8kmo'></legend><bdo id='J8kmo'><pre id='J8kmo'><center id='J8kmo'></center></pre></bdo></b><th id='J8kmo'></th></span></q></dt></tr></i><div class="assy0si" id='J8kmo'><tfoot id='J8kmo'></tfoot><dl id='J8kmo'><fieldset id='J8kmo'></fieldset></dl></div>
                1. 本文介紹了地圖上的傳單固定大小圓圈的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

                  問(wèn)題描述

                  我正在使用 Leaflet.js 創(chuàng)建一些標(biāo)記和圓圈.我正在使用下面給出的代碼來(lái)繪制圓圈:-

                  I am using leaflet.js to create few markers and circles. I am using the below given code to draw circles : -

                   L.circle([ lat, lng ], 1000, {
                              color : colorCode,
                              stroke : false,
                              fillColor : colorCode,
                              fillOpacity : 0.7
                          });
                  

                  現(xiàn)在,如果我在 UI 上編輯這個(gè)圓圈并垂直向下拖動(dòng)這個(gè)圓圈,圓圈的大小會(huì)增加,反之亦然.類(lèi)似的問(wèn)題是用不同的 lat lngs 調(diào)用上述給定的方法.相同半徑 (1000) 大小的圓圈在地圖上以不同大小繪制.

                  Now if I edit this circle on UI and drag this circle vertically downwards, the circle size increases and vice a versa. Similar issue is with calling the above given method with different lat lngs. The same radius (1000) sized circle get plotted with different sizes on map.

                  我的要求是在地圖上到處放置相同半徑和相同大小的標(biāo)記.

                  My requirement is to place marker with same radius with same size on map everywhere.

                  我檢查了 L.circleMarker,但它需要以像素為單位的半徑,并且 circleMarkers 不會(huì)在 zoomin zoomout 事件中縮放.這就是為什么我不能使用 circleMarkers.

                  I checked L.circleMarker but it takes radius in pixels and also circleMarkers does not scale in zoomin zoomout events. That is why I can't use circleMarkers.

                  我將 crs 選項(xiàng)更改為 4326 但沒(méi)有成功.我使用的是 imageOverlay 而不是tileset.我創(chuàng)造了一個(gè)小提琴.
                  http://jsfiddle.net/newBee_/88bdrzkr/12/

                  I changed the crs option to 4326 but no success. I am using imageOverlay not tileset. I have created a fiddle.
                  http://jsfiddle.net/newBee_/88bdrzkr/12/

                  嘗試在頂部區(qū)域創(chuàng)建一個(gè)圓圈,然后對(duì)其進(jìn)行編輯并向下移動(dòng).它的大小增加了.這就是我想要停止的.這將解決通過(guò)代碼在相同大小的地圖的不同區(qū)域生成相同半徑的圓的問(wèn)題.請(qǐng)幫忙.

                  Try creating a circle on top area then edit and move it downwards. It's size increases. This is what I want to stop. This will resolve the problem of generating circle of same radius via code in different area of map with same size. Please help.

                  請(qǐng)?zhí)岢鼋ㄗh.

                  推薦答案

                  看起來(lái)這是一個(gè) 深入 Leaflet 0.x 的錯(cuò)誤:L.Circle 半徑計(jì)算使用硬編碼的地球投影而??不是指定的 CRS.Leaflet 1.0 似乎在使用與地球相關(guān)的計(jì)算之前正確檢查了 CRS.

                  It looks like this is a bug deep into Leaflet 0.x: L.Circle radius computation uses hard-coded Earth projection rather than the specified CRS. Leaflet 1.0 seems to correctly check for the CRS before using the Earth-related computation.

                  對(duì)于您的情況,簡(jiǎn)單地覆蓋錯(cuò)誤的方法似乎可以修復(fù)它,至少在視覺(jué)上是這樣.

                  For your case, simply overriding the faulty method seems to fix it, at least visually.

                  演示:http://jsfiddle.net/88bdrzkr/13/

                  要包含在腳本中的更正"方法:

                  The "corrected" method to include in your script:

                  L.Circle.include({
                      _getLngRadius: function () {
                          return this._getLatRadius();
                      }
                  });
                  

                  關(guān)于 iH8 的回答,覆蓋 L.CRS.Simple.scale 的技巧類(lèi)似于高度縮放(256 因子將 latLng 擴(kuò)展到更多像素 - 任何高數(shù)字會(huì)做).在高變焦時(shí),您正在沿非常短的距離移動(dòng)圓圈,而緯度不會(huì)發(fā)生太大變化.因此,即使錯(cuò)誤仍然存??在,您也看不到任何明顯的半徑差異.

                  Regarding iH8's answer, the trick to override L.CRS.Simple.scale is similar to highly zooming (the 256 factor expands the latLng to much further pixels - any high number will do). At high zoom, you are moving your circle along a very short distance, for which the latitude does not change much. So you do not see any visible difference in radius, even though the bug is still there.

                  僅使用更高縮放的演示,根本沒(méi)有方法覆蓋:http://jsfiddle.net/kau6g8fk/1/

                  Demo of using just higher zoom, no method override at all: http://jsfiddle.net/kau6g8fk/1/

                  如果您需要讓圓圈看起來(lái)更像視覺(jué)輔助工具,這 3 種解決方案中的任何一種都足夠了.

                  For your need where the circle looks to be more like a visual aid, any of these 3 solutions is enough.

                  CRS 根本不是問(wèn)題.

                  the CRS is not the issue at all.

                  上一條消息:

                  如果您使用 Leaflet 進(jìn)行室內(nèi)映射,正如您的 jsFiddle 建議的那樣(或任何平面類(lèi)型的地圖,而不是像地球這樣的球體在平面上的投影),您可以簡(jiǎn)單地使用 L.CRS.Simple

                  If you use Leaflet for indoor mapping, as your jsFiddle suggests (or any flat type map, as opposed to the projection of a sphere like Earth on to a plane), you could simply use L.CRS.Simple

                  這篇關(guān)于地圖上的傳單固定大小圓圈的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                  相關(guān)文檔推薦

                  Check if a polygon point is inside another in leaflet(檢查一個(gè)多邊形點(diǎn)是否在傳單中的另一個(gè)內(nèi)部)
                  Changing leaflet markercluster icon color, inheriting the rest of the default CSS properties(更改傳單標(biāo)記群集圖標(biāo)顏色,繼承其余默認(rèn) CSS 屬性)
                  Trigger click on leaflet marker(觸發(fā)點(diǎn)擊傳單標(biāo)記)
                  How can I change the default loading tile color in LeafletJS?(如何更改 LeafletJS 中的默認(rèn)加載磁貼顏色?)
                  Add external geojson to leaflet layer(將外部geojson添加到傳單層)
                  Adding Leaflet layer control to sidebar(將 Leaflet 圖層控件添加到側(cè)邊欄)
                      <tbody id='BETL3'></tbody>
                      <bdo id='BETL3'></bdo><ul id='BETL3'></ul>
                        <tfoot id='BETL3'></tfoot>
                      • <i id='BETL3'><tr id='BETL3'><dt id='BETL3'><q id='BETL3'><span id='BETL3'><b id='BETL3'><form id='BETL3'><ins id='BETL3'></ins><ul id='BETL3'></ul><sub id='BETL3'></sub></form><legend id='BETL3'></legend><bdo id='BETL3'><pre id='BETL3'><center id='BETL3'></center></pre></bdo></b><th id='BETL3'></th></span></q></dt></tr></i><div class="iqqayw2" id='BETL3'><tfoot id='BETL3'></tfoot><dl id='BETL3'><fieldset id='BETL3'></fieldset></dl></div>

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

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

                          1. 主站蜘蛛池模板: 泰国专线_泰国物流专线_广州到泰国物流公司-泰廊曼国际 | 污水处理设备维修_污水处理工程改造_机械格栅_过滤设备_气浮设备_刮吸泥机_污泥浓缩罐_污水处理设备_污水处理工程-北京龙泉新禹科技有限公司 | 膏剂灌装旋盖机-眼药水灌装生产线-西林瓶粉剂分装机-南通博琅机械科技 | 碎石机设备-欧版反击破-欧版颚式破碎机(站)厂家_山东奥凯诺机械 高低温试验箱-模拟高低温试验箱订制-北京普桑达仪器科技有限公司【官网】 | 塑胶地板-商用PVC地板-pvc地板革-安耐宝pvc塑胶地板厂家 | 硬度计_影像测量仪_维氏硬度计_佛山市精测计量仪器设备有限公司厂家 | 插针变压器-家用电器变压器-工业空调变压器-CD型电抗器-余姚市中驰电器有限公司 | 平面钻,法兰钻,三维钻-山东兴田阳光智能装备股份有限公司 | 免费B2B信息推广发布平台 - 推发网 | 进口消泡剂-道康宁消泡剂-陶氏消泡剂-大洋消泡剂 | 石牌坊价格石牌坊雕刻制作_石雕牌坊牌楼石栏杆厂家_山东嘉祥石雕有限公司 | 上海软件开发-上海软件公司-软件外包-企业软件定制开发公司-咏熠科技 | 耐磨焊丝,堆焊焊丝,耐磨药芯焊丝,碳化钨焊丝-北京耐默公司 | 儿童乐园|游乐场|淘气堡招商加盟|室内儿童游乐园配套设备|生产厂家|开心哈乐儿童乐园 | 大_小鼠elisa试剂盒-植物_人Elisa试剂盒-PCR荧光定量试剂盒-上海一研生物科技有限公司 | 河南膏药贴牌-膏药代加工-膏药oem厂家-洛阳今世康医药科技有限公司 | 精密模具制造,注塑加工,吹塑和吹瓶加工,EPS泡沫包装生产 - 济南兴田塑胶有限公司 | 长沙发电机-湖南发电机-柴油发电机供应厂家-长沙明邦智能科技 | 乙炔气体报警装置|固定式氯化氢检测仪|河南驰诚电气百科 | 工业铝型材-铝合金电机壳-铝排-气动执行器-山东永恒能源集团有限公司 | 南京PVC快速门厂家南京快速卷帘门_南京pvc快速门_世界500强企业国内供应商_南京美高门业 | 西安微信朋友圈广告投放_微信朋友圈推广_西安度娘网络科技有限公司 | elisa试剂盒价格-酶联免疫试剂盒-猪elisa试剂盒-上海恒远生物科技有限公司 | 乳化沥青设备_改性沥青设备_沥青加温罐_德州市昊通路桥工程有限公司 | 儋州在线-儋州招聘找工作、找房子、找对象,儋州综合生活信息门户! | 焊接烟尘净化器__焊烟除尘设备_打磨工作台_喷漆废气治理设备 -催化燃烧设备 _天津路博蓝天环保科技有限公司 | 福建自考_福建自学考试网| 南京交通事故律师-专打交通事故的南京律师 | 撕碎机,撕破机,双轴破碎机-大件垃圾破碎机厂家 | 英国雷迪地下管线探测仪-雷迪RD8100管线仪-多功能数字听漏仪-北京迪瑞进创科技有限公司 | 招商帮-一站式网络营销服务|互联网整合营销|网络推广代运营|信息流推广|招商帮企业招商好帮手|搜索营销推广|短视视频营销推广 | 工业淬火油烟净化器,北京油烟净化器厂家,热处理油烟净化器-北京众鑫百科 | 美国查特CHART MVE液氮罐_查特杜瓦瓶_制造全球品质液氮罐 | 河南道路标志牌_交通路标牌_交通标志牌厂家-郑州路畅交通 | 恒温振荡混匀器-微孔板振荡器厂家-多管涡旋混匀器厂家-合肥艾本森(www.17world.net) | 智能化的检漏仪_气密性测试仪_流量测试仪_流阻阻力测试仪_呼吸管快速检漏仪_连接器防水测试仪_车载镜头测试仪_奥图自动化科技 | 成人纸尿裤,成人尿不湿,成人护理垫-山东康舜日用品有限公司 | 潍坊大集网-潍坊信息港-潍坊信息网 | 集装箱箱号识别_自重载重图像识别_铁路车号自动识别_OCR图像识别 | 西安文都考研官网_西安考研辅导班_考研培训机构_西安在职考研培训 | 至顶网 |