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

  • <tfoot id='SJHoR'></tfoot>

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

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

      1. 未找到傳單標記生產環境

        Leaflet Marker not found production env(未找到傳單標記生產環境)
          <tbody id='3wMA8'></tbody>
            1. <small id='3wMA8'></small><noframes id='3wMA8'>

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

                • <bdo id='3wMA8'></bdo><ul id='3wMA8'></ul>
                  <legend id='3wMA8'><style id='3wMA8'><dir id='3wMA8'><q id='3wMA8'></q></dir></style></legend>
                  本文介紹了未找到傳單標記生產環境的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  傳單有問題.

                  在開發中一切正常,但在生產中,我的應用無法找到 marker-icon.pngmarker-shadow.png 圖像.

                  Everything is working fine in development, but in production, my app isn't able to locate the marker-icon.png and marker-shadow.png images.

                  它正在尋找路徑assets/station/images/marker-icon.png

                  Leaflet js 在我的 html.erb 文件中包含這樣的內容

                  Leaflet js is including like this in my html.erb file

                  <script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.5/leaflet.js"></script>
                  
                  <link rel="stylesheet"  />
                  

                  如果有人可以幫忙!

                  推薦答案

                  這是Leaflet中的一個已知bug,根本問題是Leaflet的圖標圖像位置在捆綁過程中被錯誤引用.

                  您可以驗證這是您的問題,購買驗證此參數(在運行時):L.Icon.Default.prototype._getIconUrl().
                  正確的值應該是 <some_directory>/leaflet/dist/images/.
                  但是,如果您遇到此錯誤,則其值為:data:image/png;base64,iVBO....K5CYII=")undefined

                  This is a known bug in Leaflet, the root issue is that Leaflet's icon image location is been wrongly referenced during bundling.

                  You can verify that this is your issue, buy validating this parameter (in run time): L.Icon.Default.prototype._getIconUrl().
                  The correct value should be <some_directory>/leaflet/dist/images/.
                  However if this bug is happening to you, it's value is: data:image/png;base64,iVBO....K5CYII=")undefined

                  根據您使用的捆綁加載器(Vanila WebPack、Angular-Cli - WebPack 的超集等),有不同的解決方案(變通方法).

                  There are different solutions (work around) depending on which bundle-loader you are using (Vanila WebPack, Angular-Cli - superset of WebPack, etc...).

                  您可以在此處查看原始問題(以及不同的解決方案,具體取決于您的 bandle-loader):
                  https://github.com/Leaflet/Leaflet/issues/4968

                  You can see the original issue here (as well as different solutions depending on your bandle-loader):
                  https://github.com/Leaflet/Leaflet/issues/4968

                  如果您使用的是 Angular-Cli,此解決方案將適合您.在設置 Maker 之前在某處添加此代碼:

                  If you are using Angular-Cli this solution will work for you. Add this code somewhere before setting the Maker:

                  import { icon, Marker } from 'leaflet';
                  const iconRetinaUrl = 'assets/marker-icon-2x.png';
                  const iconUrl = 'assets/marker-icon.png';
                  const shadowUrl = 'assets/marker-shadow.png';
                  const iconDefault = icon({
                    iconRetinaUrl,
                    iconUrl,
                    shadowUrl,
                    iconSize: [25, 41],
                    iconAnchor: [12, 41],
                    popupAnchor: [1, -34],
                    tooltipAnchor: [16, -28],
                    shadowSize: [41, 41]
                  });
                  Marker.prototype.options.icon = iconDefault;
                  

                  (此代碼會將損壞的 Marker 的 url 更改為資產文件夾中的有效圖像).

                  (this code will change the broken Marker's url, to a valid image from your assets folder).

                  并將此代碼添加到您的 angular.json(對于 Angular 版本 >= 6.x)或您的 angular-cli.json(對于 Angular 版本 <= 5.x):

                  And add this code at you angular.json (for Angular version >= 6.x) or at your angular-cli.json (for Angular version <= 5.x):

                  "assets":
                  [
                     "src/favicon.ico",
                     "src/assets",
                     {
                        "glob": "**/*",
                        "input": "node_modules/leaflet/dist/images/", // you may need to change this path, according to your files structure
                        "output": "./assets/"
                     }
                  ] ...
                  

                  (此代碼會將原始標記圖像復制到 /assets 文件夾,以便 angular-cli 可以加載它們)

                  (this code will copy the original Marker images to the /assets folder so angular-cli could load them)

                  這篇關于未找到傳單標記生產環境的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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 圖層控件添加到側邊欄)
                • <i id='lnPxP'><tr id='lnPxP'><dt id='lnPxP'><q id='lnPxP'><span id='lnPxP'><b id='lnPxP'><form id='lnPxP'><ins id='lnPxP'></ins><ul id='lnPxP'></ul><sub id='lnPxP'></sub></form><legend id='lnPxP'></legend><bdo id='lnPxP'><pre id='lnPxP'><center id='lnPxP'></center></pre></bdo></b><th id='lnPxP'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='lnPxP'><tfoot id='lnPxP'></tfoot><dl id='lnPxP'><fieldset id='lnPxP'></fieldset></dl></div>

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

                  <legend id='lnPxP'><style id='lnPxP'><dir id='lnPxP'><q id='lnPxP'></q></dir></style></legend>
                  <tfoot id='lnPxP'></tfoot>

                          <tbody id='lnPxP'></tbody>
                          <bdo id='lnPxP'></bdo><ul id='lnPxP'></ul>
                            主站蜘蛛池模板: 精品国产乱码久久久久久1区2区 | 国产精品亚洲一区二区三区在线观看 | 天天操一操 | 日韩视频国产 | 欧美日韩视频在线第一区 | 亚洲小视频 | 99成人| 91 中文字幕 | 亚洲一区国产 | 成年人的视频免费观看 | 酒色成人网 | 久久久www | 亚洲国产一区二区三区 | 国产在线精品一区二区三区 | 蜜臀91视频| 羞羞视频网站免费观看 | 久久亚洲一区二区三 | 久久com | 一级做a爰片性色毛片16美国 | 天天插天天狠天天透 | 999久久久久久久久6666 | 日韩精品在线一区 | 日韩精品一区二区三区免费观看 | 精品三级在线观看 | 中文天堂网 | www.99热.com| 狠狠色综合久久丁香婷婷 | 久久亚洲国产精品 | 韩日在线视频 | 欧美日韩国产综合在线 | 毛片在线看片 | 国产日韩欧美在线 | 亚洲精品v| 国产成人综合亚洲欧美94在线 | 亚洲美女av网站 | 亚洲精品福利在线 | 成人一级黄色毛片 | 九九久久久 | 久久精品视频网站 | 日本不卡免费新一二三区 | 午夜精品导航 |