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

  • <small id='ZWS1E'></small><noframes id='ZWS1E'>

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

          <bdo id='ZWS1E'></bdo><ul id='ZWS1E'></ul>
      1. 在傳單中旋轉標記

        Rotate marker in Leaflet(在傳單中旋轉標記)
        <legend id='fxOMJ'><style id='fxOMJ'><dir id='fxOMJ'><q id='fxOMJ'></q></dir></style></legend>

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

          • <tfoot id='fxOMJ'></tfoot>
            • <small id='fxOMJ'></small><noframes id='fxOMJ'>

                  <tbody id='fxOMJ'></tbody>
              1. <i id='fxOMJ'><tr id='fxOMJ'><dt id='fxOMJ'><q id='fxOMJ'><span id='fxOMJ'><b id='fxOMJ'><form id='fxOMJ'><ins id='fxOMJ'></ins><ul id='fxOMJ'></ul><sub id='fxOMJ'></sub></form><legend id='fxOMJ'></legend><bdo id='fxOMJ'><pre id='fxOMJ'><center id='fxOMJ'></center></pre></bdo></b><th id='fxOMJ'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='fxOMJ'><tfoot id='fxOMJ'></tfoot><dl id='fxOMJ'><fieldset id='fxOMJ'></fieldset></dl></div>
                • 本文介紹了在傳單中旋轉標記的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  如何在傳單中旋轉標記?我會有很多標記,都有一個旋轉角度.

                  How can I rotate a marker in leaflet? I will have a lot of markers, all with a rotation angle.

                  我在 Leaflet on GitHub 上嘗試了 runanet/coomsie 的這個解決方案,但我的標記沒有任何反應:

                  I've tried this solution from runanet/coomsie at Leaflet on GitHub, but nothing happens with my marker:

                  L.Marker.RotatedMarker= L.Marker.extend({    
                      _reset: function() {
                          var pos = this._map.latLngToLayerPoint(this._latlng).round();
                  
                          L.DomUtil.setPosition(this._icon, pos);
                          if (this._shadow) {
                              L.DomUtil.setPosition(this._shadow, pos);
                          }
                  
                          if (this.options.iconAngle) {
                              this._icon.style.WebkitTransform = this._icon.style.WebkitTransform + ' rotate(' + this.options.iconAngle + 'deg)';
                              this._icon.style.MozTransform = 'rotate(' + this.options.iconAngle + 'deg)';
                              this._icon.style.MsTransform = 'rotate(' + this.options.iconAngle + 'deg)';
                              this._icon.style.OTransform = 'rotate(' + this.options.iconAngle + 'deg)';
                          }
                  
                          this._icon.style.zIndex = pos.y;
                      },
                  
                      setIconAngle: function (iconAngle) {
                  
                          if (this._map) {
                              this._removeIcon();
                          }
                  
                          this.options.iconAngle = iconAngle;
                  
                          if (this._map) {
                              this._initIcon();
                              this._reset();
                          }
                      }
                  
                  });
                  
                  var rotated = new L.Marker.RotatedMarker([63.42, 10.39]);
                  rotated.setIconAngle(90);
                  rotated.addTo(map);
                  

                  還有其他想法或解決方案嗎?(在 Windows 上使用 Firefox 16 進行測試.)

                  Any other ideas or solutions? (Testing with Firefox 16 on Windows.)

                  推薦答案

                  按原樣運行代碼,當你嘗試在 Firefox 中旋轉它時,圖標會消失(嘗試在鼠標單擊而不是加載時旋轉,你會看到該圖標會在您嘗試旋轉它之前出現),但我敢打賭它會(第一次)在 webkit 瀏覽器中工作.原因是變換線:

                  Running the code as it is, the icon will disappear when you try to rotate it in Firefox (try rotating on a mouseclick instead of on load and you will see that the icon appears before you try to rotate it), but I'm willing to bet it will work (the first time) in a webkit browser. The reason is the transform lines:

                  this._icon.style.WebkitTransform = this._icon.style.WebkitTransform + ' rotate(' + this.options.iconAngle + 'deg)';
                  this._icon.style.MozTransform = 'rotate(' + this.options.iconAngle + 'deg)';
                  

                  Firefox 還使用 CSS 變換來定位圖標,因此在旋轉之前 Moztransform 將具有例如translate(956px, 111px)"的值.按照現在的代碼方式,它將用簡單的rotate(90deg)"替換它,Firefox 將不知道將圖標放在哪里.

                  Firefox also uses CSS transforms to position icons, so before rotation it will have Moztransform will have a value of for example "translate(956px, 111px)". The way the code is now, it will replace that with simply "rotate(90deg)" and Firefox won't know where to place the icon.

                  您希望 Moztransform 的值為translate(956px, 111px) rotate(90deg)",因此如果您使用此代碼,它會在第一次工作,就像在 webkit 中一樣.

                  You want Moztransform to have a value of "translate(956px, 111px) rotate(90deg)", so if you use this code it will work the first time, like in webkit.

                  this._icon.style.MozTransform = this._icon.style.MozTransform  + ' rotate(' + this.options.iconAngle + 'deg)';
                  

                  但是,它會在下一次旋轉時中斷,因此您確實需要一次性設置平移和旋轉,如下所示:

                  However, it will break on the next rotate, so you really need to set both the translation and rotation in one go, like this:

                  this._icon.style.MozTransform = L.DomUtil.getTranslateString(pos) + ' rotate(' + this.options.iconAngle + 'deg)';
                  

                  然后你可以擺脫 L.DomUtil.setPosition(this._icon, pos);一開始.

                  Then you can get rid of the L.DomUtil.setPosition(this._icon, pos); at the start.

                  這篇關于在傳單中旋轉標記的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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 中的默認加載磁貼顏色?)
                  Adding Leaflet layer control to sidebar(將 Leaflet 圖層控件添加到側邊欄)
                  Leaflet - get latitude and longitude of a marker inside a pop-up(Leaflet - 在彈出窗口中獲取標記的緯度和經度)
                  <tfoot id='U4Vua'></tfoot>

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

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

                          <legend id='U4Vua'><style id='U4Vua'><dir id='U4Vua'><q id='U4Vua'></q></dir></style></legend>
                            <tbody id='U4Vua'></tbody>
                          1. <i id='U4Vua'><tr id='U4Vua'><dt id='U4Vua'><q id='U4Vua'><span id='U4Vua'><b id='U4Vua'><form id='U4Vua'><ins id='U4Vua'></ins><ul id='U4Vua'></ul><sub id='U4Vua'></sub></form><legend id='U4Vua'></legend><bdo id='U4Vua'><pre id='U4Vua'><center id='U4Vua'></center></pre></bdo></b><th id='U4Vua'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='U4Vua'><tfoot id='U4Vua'></tfoot><dl id='U4Vua'><fieldset id='U4Vua'></fieldset></dl></div>
                            主站蜘蛛池模板: 亚洲天堂一区二区 | 久久精品国产99国产精品亚洲 | 亚洲日韩中文字幕一区 | 色综合99 | 免费激情网站 | 日本精品一区二区三区四区 | 欧美日韩高清在线一区 | 99亚洲视频| 国产伦精品一区二区三区四区视频 | 亚洲一区二区三区四区在线观看 | 中文字幕亚洲精品 | 久久99精品久久久久久国产越南 | 久久久新视频 | 欧美日韩在线免费 | 丁香六月伊人 | 国产成人一区二区 | 成人精品视频 | 亚洲精品www久久久 www.蜜桃av | 黑人巨大精品欧美一区二区免费 | 五月槐花香| 国产精品久久午夜夜伦鲁鲁 | av香港经典三级级 在线 | 国产成人一区二区三区电影 | 国产精品福利在线 | 一区二区三区播放 | 91佛爷在线观看 | 四虎永久免费影院 | 欧产日产国产精品v | avhd101在线成人播放 | 日韩成人一区 | 天天操天天插 | 午夜精品久久久久久久星辰影院 | 一级大黄 | 国产亚洲成av人片在线观看桃 | 久久久久久久久淑女av国产精品 | 97色伦网 | 亚洲综合一区二区三区 | 狠狠操狠狠干 | 欧美成人a∨高清免费观看 色999日韩 | 日韩1区| 欧美精品一区二区在线观看 |