久久久久久久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>

                            主站蜘蛛池模板: 一级日韩| 最新日韩在线 | 色婷婷av99xx | 久草在线| 五月婷婷丁香 | 国产国语精品 | 黑色丝袜三级在线播放 | 亚洲精品久久久9婷婷中文字幕 | 亚洲一区在线日韩在线深爱 | 九九免费| 国产精品国产三级国产aⅴ原创 | 特级毛片爽www免费版 | 99色综合| 国产成人在线视频播放 | 国产乱人伦 | 成人精品一区二区户外勾搭野战 | 欧美 日韩 在线播放 | 亚洲精品一区二区三区四区高清 | 久久久久久久电影 | 欧美高清性xxxxhd | 午夜免费看 | 秋霞在线一区 | 免费观看成人鲁鲁鲁鲁鲁视频 | 中文字幕综合在线 | 免费观看a级毛片在线播放 黄网站免费入口 | 波多野结衣电影一区 | 日日夜夜91 | 毛片软件 | 亚洲精品视频网站在线观看 | 91xxx在线观看 | 久久人人网 | 成人精品国产一区二区4080 | 国产成人99久久亚洲综合精品 | 毛片软件| 欧美日韩大片 | 色综合久久久 | www.色.com | 亚洲精品一区中文字幕乱码 | 福利网址| 亚洲高清视频在线 | 高清视频一区二区三区 |