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

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

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

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

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

        Leaflet + Polymer 2 使用扭曲的瓷磚加載地圖,但適用

        Leaflet + Polymer 2 map loading with distorted tile however works with non-polymer code(Leaflet + Polymer 2 使用扭曲的瓷磚加載地圖,但適用于非聚合物代碼)
        <i id='SSSUE'><tr id='SSSUE'><dt id='SSSUE'><q id='SSSUE'><span id='SSSUE'><b id='SSSUE'><form id='SSSUE'><ins id='SSSUE'></ins><ul id='SSSUE'></ul><sub id='SSSUE'></sub></form><legend id='SSSUE'></legend><bdo id='SSSUE'><pre id='SSSUE'><center id='SSSUE'></center></pre></bdo></b><th id='SSSUE'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='SSSUE'><tfoot id='SSSUE'></tfoot><dl id='SSSUE'><fieldset id='SSSUE'></fieldset></dl></div>
          <tbody id='SSSUE'></tbody>

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

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

            1. <legend id='SSSUE'><style id='SSSUE'><dir id='SSSUE'><q id='SSSUE'></q></dir></style></legend>
                1. <tfoot id='SSSUE'></tfoot>

                  本文介紹了Leaflet + Polymer 2 使用扭曲的瓷磚加載地圖,但適用于非聚合物代碼的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  更新:我現在已經在 代碼片段:

                  <style include="shared-styles publish-project-styles">:主持人 {顯示:塊;填充:20px;}#mapContainer{寬度:100%;高度:400px;邊框:1px 實心#0A569D;}.傳單容器{寬度:100%;高度:400px;邊框:1px 實心#0A569D;}</風格><td id="leftContainer" width="50%" style="padding: 15px;"><div id="mapContainer"></div><!-- <canvas id="mapContainer" style="width: 400px; height: 400px; 邊框: 1px solid #0A569D;"></canvas>--></td>準備好() {super.ready();讓leafmap = L.map(this.$.mapContainer).setView([48.84, 2.3], 5);L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {最大縮放:18}).addTo(leafmap);}

                  更新代碼:

                  <style include="shared-styles publish-project-styles">:主持人 {顯示:塊;填充:20px;}#mapContainer{寬度:100%;高度:400px;邊框:1px 實心#0A569D;}.傳單容器{寬度:100%;高度:400px;邊框:1px 實心#0A569D;}</風格><td id="leftContainer" width="50%" style="padding: 15px;"><div id="mapContainer"></div><!-- <canvas id="mapContainer" style="width: 400px; height: 400px; 邊框: 1px solid #0A569D;"></canvas>--></td>連接回調(){super.connectedCallback();讓leafmap = L.map(this.$.mapContainer).setView([48.84, 2.3], 5);L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {最大縮放:18}).addTo(leafmap);葉圖.invalidateSize();}

                  我確實嘗試過使用內聯 CSS,將 JS 放入 connectedcallback() &ready(),將 CSS 放入父元素等.

                  我假設,鑒于我閱讀的帖子存在一些 CSS 問題.但不確定.如果有人可以在這方面提供幫助,真的很感激?如果需要更多信息,請告訴我.

                  謝謝.

                  解決方案

                  Leaflet CSS 樣式不適用于陰影 DOM 元素.

                  要使其工作,您需要在此處添加leaflet.css:

                  //...<link type="text/css" rel="stylesheet" ><p>我是 x-foo 的 shadow DOM 子元素.</p>//...

                  工作示例:https://plnkr.co/edit/CJUlwUnBezum9jgt93uF?p=preview

                  UPDATE: I have now replicated this issue in Plunker. I did check the duplicate question suggested. The answer is incorrect or missing CSS file. I have imported v1.3.4 for CSS and JS as mentioned in leaflet quick start. The Plunker shows the CSS is included in Shadow DOM of the element. This is not the case for me. Also, the same version of JS and CSS works for non-polymer code, however, the distortion occurs with Polymer.

                  I am struggling for several days now to get the leaflet map loaded properly within Polymer 2. This issue is taking the soul out of me now. I have searched various threads in SO: this, Github: this, this and several other posts, unfortunately still could not fix the issue. Tested in both Chrome and Firefox. I have tried with Openlayers and the map loads perfectly. The issue arises when using Leaflet and Mapbox API. Unfortunately, due to customer requirements, cannot use Openlayers.

                  My map renders like this: Code fragments:

                  <style include="shared-styles publish-project-styles">
                      :host {
                      display: block;
                      padding: 20px;
                    }
                      #mapContainer{
                          width: 100%; height: 400px; border: 1px solid #0A569D;
                      }
                  
                      .leaflet-container{
                          width: 100%; height: 400px; border: 1px solid #0A569D;
                      }
                  </style>
                  
                  <td  id="leftContainer" width="50%" style="padding: 15px;">
                   <div id="mapContainer"></div>
                   <!-- <canvas id="mapContainer" style="width: 400px; height: 400px; border: 1px solid #0A569D;"></canvas> --></td>
                  
                  ready() {
                      super.ready();          
                      let leafmap = L.map(this.$.mapContainer).setView([48.84, 2.3], 5);
                      L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
                                  maxZoom: 18
                              }).addTo(leafmap);
                  }
                  

                  UPDATED Code:

                  <style include="shared-styles publish-project-styles">
                      :host {
                      display: block;
                      padding: 20px;
                    }
                      #mapContainer{
                          width: 100%; height: 400px; border: 1px solid #0A569D;
                      }
                  
                      .leaflet-container{
                          width: 100%; height: 400px; border: 1px solid #0A569D;
                      }
                  </style>
                  
                  <td  id="leftContainer" width="50%" style="padding: 15px;">
                   <div id="mapContainer"></div>
                   <!-- <canvas id="mapContainer" style="width: 400px; height: 400px; border: 1px solid #0A569D;"></canvas> --></td>
                  
                  connectedCallback() {
                      super.connectedCallback();          
                      let leafmap = L.map(this.$.mapContainer).setView([48.84, 2.3], 5);
                      L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
                                  maxZoom: 18
                              }).addTo(leafmap);
                      leafmap.invalidateSize();
                  }
                  

                  I did try with inline CSS, putting JS in connectedcallback() & ready(), putting CSS in parent element etc.

                  I am assuming, there is some CSS problem given the posts that I read. But not sure. Would really appreciate if someone could help in this regard? Please let me know if more info is needed.

                  Thanks.

                  解決方案

                  Leaflet CSS styles are not applied to shadow DOM elements.

                  To make it work you need to add leaflet.css here:

                  // ...
                  <link type="text/css" rel="stylesheet" >
                  
                  <p>I'm a shadow DOM child element of x-foo.</p>
                  // ...
                  

                  Working example: https://plnkr.co/edit/CJUlwUnBezum9jgt93uF?p=preview

                  這篇關于Leaflet + Polymer 2 使用扭曲的瓷磚加載地圖,但適用于非聚合物代碼的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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 - 在彈出窗口中獲取標記的緯度和經度)

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

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

                            主站蜘蛛池模板: 99精品欧美一区二区三区综合在线 | 三级成人在线 | 久久精品国产一区二区三区不卡 | 一a级片| 久久国产精品久久国产精品 | 中文字幕在线电影观看 | 精品欧美乱码久久久久久 | 国产精品视频二区三区 | 国产91综合一区在线观看 | 2020国产在线| 成人午夜电影在线观看 | 亚洲欧美日韩激情 | 免费网站在线 | 麻豆视频国产在线观看 | 亚洲一二三视频 | 国产精品美女久久久久久久网站 | 一级黄色夫妻生活 | 中文字幕成人av | 久久手机视频 | 国户精品久久久久久久久久久不卡 | 亚洲精品9999 | 涩涩鲁亚洲精品一区二区 | 农夫在线精品视频免费观看 | 一区二区三区在线播放 | 成人免费视频 | 欧美日韩久久精品 | 中文字幕成人在线 | 一区二区在线不卡 | 色婷婷婷婷色 | 成人免费三级电影 | 日日摸夜夜爽人人添av | 久久久www成人免费无遮挡大片 | 青草青草久热精品视频在线观看 | 国产99久久 | 99久久免费精品国产免费高清 | 亚洲国产高清高潮精品美女 | 久久精品国产亚洲一区二区 | 免费看的av | 日韩视频在线免费观看 | 国产精品一区二 | 欧美激情一区二区 |