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

<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="qwawimqqmiuu" 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="qwawimqqmiuu" id='J8kmo'><tfoot id='J8kmo'></tfoot><dl id='J8kmo'><fieldset id='J8kmo'></fieldset></dl></div>
                1. 本文介紹了地圖上的傳單固定大小圓圈的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

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

                  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ì)增加,反之亦然.類似的問題是用不同的 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 但沒有成功.我使用的是 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).它的大小增加了.這就是我想要停止的.這將解決通過代碼在相同大小的地圖的不同區(qū)域生成相同半徑的圓的問題.請(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.

                  推薦答案

                  看起來這是一個(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ù)它,至少在視覺上是這樣.

                  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 的技巧類似于高度縮放(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.

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

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

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

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

                  CRS 根本不是問題.

                  the CRS is not the issue at all.

                  上一條消息:

                  如果您使用 Leaflet 進(jìn)行室內(nèi)映射,正如您的 jsFiddle 建議的那樣(或任何平面類型的地圖,而不是像地球這樣的球體在平面上的投影),您可以簡(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)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(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="qwawimqqmiuu" 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. 主站蜘蛛池模板: 91视在线国内在线播放酒店 | 色香蕉在线| 成年视频在线观看福利资源 | av播播| 成人精品久久 | 国产亚洲一区二区三区在线 | 视频二区| 欧美成人h版在线观看 | 天堂网av在线 | 成人在线视频一区 | 国产免费一区二区三区 | 中文字幕在线一区 | 日韩一级欧美一级 | 在线日韩中文字幕 | 亚洲国产精品一区在线观看 | 亚洲精品一区二区久 | 久草在线影 | 都市激情亚洲 | 国产成人综合在线 | 99精品在线 | 男人的天堂久久 | 欧美一二三| 亚洲男女视频在线观看 | 午夜免费福利电影 | www.天天操.com | av网站观看 | 午夜视频在线免费观看 | 成人免费视屏 | 久久噜噜噜精品国产亚洲综合 | 日韩乱码一二三 | 日韩免费一级 | 在线色网站 | 亚洲一区二区三区高清 | 国产在线视频一区 | 欧美成人一区二区 | 久久国产精品一区二区 | 国产成人免费视频 | 天天干天天色 | 91精品国产综合久久福利软件 | 三级黄色片在线 | 91精品国产乱码久久久久久久久 |