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

        <bdo id='Op6T2'></bdo><ul id='Op6T2'></ul>

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

    2. 圍繞傳單地圖中的點旋轉多邊形

      rotate polygon around point in leaflet map(圍繞傳單地圖中的點旋轉多邊形)
      <i id='ymeGr'><tr id='ymeGr'><dt id='ymeGr'><q id='ymeGr'><span id='ymeGr'><b id='ymeGr'><form id='ymeGr'><ins id='ymeGr'></ins><ul id='ymeGr'></ul><sub id='ymeGr'></sub></form><legend id='ymeGr'></legend><bdo id='ymeGr'><pre id='ymeGr'><center id='ymeGr'></center></pre></bdo></b><th id='ymeGr'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='ymeGr'><tfoot id='ymeGr'></tfoot><dl id='ymeGr'><fieldset id='ymeGr'></fieldset></dl></div>
        <bdo id='ymeGr'></bdo><ul id='ymeGr'></ul>
        • <legend id='ymeGr'><style id='ymeGr'><dir id='ymeGr'><q id='ymeGr'></q></dir></style></legend>
        • <tfoot id='ymeGr'></tfoot>

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

                  <tbody id='ymeGr'></tbody>
              1. 本文介紹了圍繞傳單地圖中的點旋轉多邊形的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                我有一個問題,在我的傳單地圖中,我從多邊形創建了一個三角形:

                I have an issue, in my leaflet map I've created a triangle from polygon:

                var polygon = L.polygon([ 
                    [parseFloat(decimal_lat),parseFloat(decimal_lon)], 
                    [parseFloat(decimal_lat) + 1, parseFloat(decimal_lon) - 1], 
                    [parseFloat(decimal_lat) + 1, parseFloat(decimal_lon) + 1] ],       
                    {
                            color:'green'
                    });
                polygon.addTo(map);
                

                我想圍繞 Point[decimal_lon, decimal_lat] 旋轉這個多邊形.但我無法解決它..
                我創建了 DEMO,我正在旋轉多項式,我想旋轉我的三角形(多邊形)向您展示我的問題.

                and I want to rotate this polygon around Point[decimal_lon, decimal_lat]. But I'm not able to solve it..
                I've created DEMO, where I'm rotating polynom the same I want to rotate my triangle (polygon) to show you my problem.

                推薦答案

                一種方法是通過矩陣旋轉.https://en.wikipedia.org/wiki/Rotation_matrix.您想將該點平移到中心,然后應用旋轉,然后將其平移回來.

                One way to do it is through matrix rotation. https://en.wikipedia.org/wiki/Rotation_matrix. You want to translate the point to the center then apply the rotation, then translate it back.

                這就是你的代碼結尾的樣子.

                This is what the end of your code would look like.

                  //changing polyline with slider but I want to change polygon there
                  range_yaw.onchange = function() {
                    var yawAngle = (parseFloat(range_yaw.value) / (819 / 360) + 90)
                    // line
                    var center = [decimal_lat, decimal_lon]
                    var end = [decimal_lat + 2, decimal_lon + 2]
                    var pointListRotated = rotatePoints(center, [center, end], yawAngle)
                    polyline.setLatLngs(pointListRotated);
                    // polygon
                    var polygonPoints = [
                      center,
                      [center[0] + 1, center[1] - 1],
                      [center[0] + 1, center[1] + 1]
                    ]
                    polygonRotated = rotatePoints(center, polygonPoints, yawAngle)
                    polygon.setLatLngs(polygonRotated)
                  };
                
                  //
                  // rotate a list of points in [lat, lng] format about the center.
                  //
                  function rotatePoints(center, points, yaw) {
                    var res = []
                    var angle = yaw * (Math.PI / 180)
                    for(var i=0; i<points.length; i++) {
                      var p = points[i]
                      // translate to center
                      var p2 = [ p[0]-center[0], p[1]-center[1] ]
                      // rotate using matrix rotation
                      var p3 = [ Math.cos(angle)*p2[0] - Math.sin(angle)*p2[1], Math.sin(angle)*p2[0] + Math.cos(angle)*p2[1]]
                      // translate back to center
                      var p4 = [ p3[0]+center[0], p3[1]+center[1]]
                      // done with that point
                      res.push(p4)
                    }
                    return res
                  }
                

                這是一個演示

                這篇關于圍繞傳單地圖中的點旋轉多邊形的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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='texfH'><style id='texfH'><dir id='texfH'><q id='texfH'></q></dir></style></legend>
                  <bdo id='texfH'></bdo><ul id='texfH'></ul>
                    <tfoot id='texfH'></tfoot>
                  1. <small id='texfH'></small><noframes id='texfH'>

                    <i id='texfH'><tr id='texfH'><dt id='texfH'><q id='texfH'><span id='texfH'><b id='texfH'><form id='texfH'><ins id='texfH'></ins><ul id='texfH'></ul><sub id='texfH'></sub></form><legend id='texfH'></legend><bdo id='texfH'><pre id='texfH'><center id='texfH'></center></pre></bdo></b><th id='texfH'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='texfH'><tfoot id='texfH'></tfoot><dl id='texfH'><fieldset id='texfH'></fieldset></dl></div>
                          <tbody id='texfH'></tbody>

                          主站蜘蛛池模板: 国产精品免费在线 | 久久久www成人免费无遮挡大片 | 午夜三区 | 91黄色免费看 | 成人自拍视频网站 | 少妇特黄a一区二区三区88av | 欧美一区不卡 | 日本小电影在线 | 黄色免费网站在线看 | 91久久久久 | 亚洲av毛片成人精品 | 国产一级在线 | 91婷婷韩国欧美一区二区 | 黄色片网此 | 国产成人精品一区二区三区 | 农村黄性色生活片 | 欧美中文一区 | 国产精品一区二区在线播放 | 成人免费观看男女羞羞视频 | 欧美一a一片一级一片 | 金莲网 | 欧美激情欧美激情在线五月 | 日韩在线小视频 | 91视频一区二区 | 免费黄色日本 | 欧美性一区二区三区 | 日日夜夜天天 | 亚洲性人人天天夜夜摸 | 国产免费观看一级国产 | 欧美h版 | 国产成人av在线播放 | 亚洲手机视频在线 | 亚洲超碰在线观看 | 免费高清av | 爽爽免费视频 | 五月婷婷激情网 | 久草免费视| 99精品视频一区二区三区 | 中国一级毛片免费 | 人人做人人澡人人爽欧美 | 国产精品久久久久久久久久妞妞 |