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

  • <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="8cg8www" 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="awugwmk" 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="w8csc8m" id='U4Vua'><tfoot id='U4Vua'></tfoot><dl id='U4Vua'><fieldset id='U4Vua'></fieldset></dl></div>
                            主站蜘蛛池模板: 小青瓦丨古建筑瓦丨青瓦厂家-宜兴市徽派古典建筑材料有限公司 | 厂房出售_厂房仓库出租_写字楼招租_土地出售-中苣招商网-中苣招商网 | 温州中研白癜风专科_温州治疗白癜风_温州治疗白癜风医院哪家好_温州哪里治疗白癜风 | 安徽华耐泵阀有限公司-官方网站 安德建奇火花机-阿奇夏米尔慢走丝|高维|发那科-北京杰森柏汇 | 耐酸碱胶管_耐腐蚀软管总成_化学品输送软管_漯河利通液压科技耐油耐磨喷砂软管|耐腐蚀化学软管 | 万濠投影仪_瑞士TRIMOS高度仪_尼康投影仪V12BDC|量子仪器 | 臭氧发生器_臭氧消毒机 - 【同林品牌 实力厂家】 | 上海刑事律师|刑事辩护律师|专业刑事犯罪辩护律师免费咨询-[尤辰荣]金牌上海刑事律师团队 | 合肥白癜风医院_合肥治疗白癜风医院_合肥看白癜风医院哪家好_合肥华研白癜风医院 | 西安耀程造价培训机构_工程预算实训_广联达实作实操培训 | 超声骨密度仪-动脉硬化检测仪器-人体成分分析仪厂家/品牌/价格_南京科力悦 | 注塑_注塑加工_注塑模具_塑胶模具_注塑加工厂家_深圳环科 | 防水套管-柔性防水套管-刚性防水套管-上海执品管件有限公司 | 河南橡胶接头厂家,河南波纹补偿器厂家,河南可曲挠橡胶软连接,河南套筒补偿器厂家-河南正大阀门 | 凝胶成像仪,化学发光凝胶成像系统,凝胶成像分析系统-上海培清科技有限公司 | 杭州货架订做_组合货架公司_货位式货架_贯通式_重型仓储_工厂货架_货架销售厂家_杭州永诚货架有限公司 | 健康管理师报名入口,2025年健康管理师考试时间信息网-网站首页 塑料造粒机「厂家直销」-莱州鑫瑞迪机械有限公司 | 众品家具网-家具品牌招商_家具代理加盟_家具门户的首选网络媒体。 | 北京遮阳网-防尘盖土网-盖土草坪-迷彩网-防尘网生产厂家-京兴科技 | 临海涌泉蜜桔官网|涌泉蜜桔微商批发代理|涌泉蜜桔供应链|涌泉蜜桔一件代发 | 硬度计,金相磨抛机_厂家-莱州华煜众信试验仪器有限公司 | 广州物流公司_广州货运公司_广州回程车运输 - 万信物流 | 橡胶膜片,夹布膜片,橡胶隔膜密封,泵阀设备密封膜片-衡水汉丰橡塑科技公司网站 | 耐高温硅酸铝板-硅酸铝棉保温施工|亿欧建设工程 | 全自动实验室洗瓶机,移液管|培养皿|进样瓶清洗机,清洗剂-广州摩特伟希尔机械设备有限责任公司 | 焊锡丝|焊锡条|无铅锡条|无铅锡丝|无铅焊锡线|低温锡膏-深圳市川崎锡业科技有限公司 | 亚克力制品定制,上海嘉定有机玻璃加工制作生产厂家—官网 | 手机游戏_热门软件app下载_好玩的安卓游戏下载基地-吾爱下载站 | 意大利Frascold/富士豪压缩机_富士豪半封闭压缩机_富士豪活塞压缩机_富士豪螺杆压缩机 | 超声波反应釜【百科】-以马内利仪器 | 矿用履带式平板车|探水钻机|气动架柱式钻机|架柱式液压回转钻机|履带式钻机-启睿探水钻机厂家 | 石磨面粉机|石磨面粉机械|石磨面粉机组|石磨面粉成套设备-河南成立粮油机械有限公司 | 杭州标识标牌|文化墙|展厅|导视|户内外广告|发光字|灯箱|铭阳制作公司 - 杭州标识标牌|文化墙|展厅|导视|户内外广告|发光字|灯箱|铭阳制作公司 | 磁力抛光机_磁力研磨机_磁力去毛刺机_精密五金零件抛光设备厂家-冠古科技 | 油漆辅料厂家_阴阳脚线_艺术漆厂家_内外墙涂料施工_乳胶漆专用防霉腻子粉_轻质粉刷石膏-魔法涂涂 | 大功率金属激光焊接机价格_不锈钢汽车配件|光纤自动激光焊接机设备-东莞市正信激光科技有限公司 定制奶茶纸杯_定制豆浆杯_广东纸杯厂_[绿保佳]一家专业生产纸杯碗的厂家 | EDLC超级法拉电容器_LIC锂离子超级电容_超级电容模组_软包单体电容电池_轴向薄膜电力电容器_深圳佳名兴电容有限公司_JMX专注中高端品牌电容生产厂家 | 数显水浴恒温振荡器-分液漏斗萃取振荡器-常州市凯航仪器有限公司 | 意大利Frascold/富士豪压缩机_富士豪半封闭压缩机_富士豪活塞压缩机_富士豪螺杆压缩机 | 金属波纹补偿器厂家_不锈钢膨胀节价格_非金属伸缩节定制-庆达补偿器 | 雪花制冰机(实验室雪花制冰机)百科 |