久久久久久久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. 未找到傳單標(biāo)記生產(chǎn)環(huán)境

        Leaflet Marker not found production env(未找到傳單標(biāo)記生產(chǎn)環(huán)境)
          <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>
                  本文介紹了未找到傳單標(biāo)記生產(chǎn)環(huán)境的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  傳單有問題.

                  在開發(fā)中一切正常,但在生產(chǎn)中,我的應(yīng)用無法找到 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 文件中包含這樣的內(nèi)容

                  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中的一個(gè)已知bug,根本問題是Leaflet的圖標(biāo)圖像位置在捆綁過程中被錯(cuò)誤引用.

                  您可以驗(yàn)證這是您的問題,購買驗(yàn)證此參數(shù)(在運(yùn)行時(shí)):L.Icon.Default.prototype._getIconUrl().
                  正確的值應(yīng)該是 <some_directory>/leaflet/dist/images/.
                  但是,如果您遇到此錯(cuò)誤,則其值為: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

                  根據(jù)您使用的捆綁加載器(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,此解決方案將適合您.在設(shè)置 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;
                  

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

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

                  并將此代碼添加到您的 angular.json(對(duì)于 Angular 版本 >= 6.x)或您的 angular-cli.json(對(duì)于 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/"
                     }
                  ] ...
                  

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

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

                  這篇關(guān)于未找到傳單標(biāo)記生產(chǎn)環(huán)境的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  Check if a polygon point is inside another in leaflet(檢查一個(gè)多邊形點(diǎn)是否在傳單中的另一個(gè)內(nèi)部)
                  Changing leaflet markercluster icon color, inheriting the rest of the default CSS properties(更改傳單標(biāo)記群集圖標(biāo)顏色,繼承其余默認(rèn) CSS 屬性)
                  Trigger click on leaflet marker(觸發(fā)點(diǎn)擊傳單標(biāo)記)
                  How can I change the default loading tile color in LeafletJS?(如何更改 LeafletJS 中的默認(rèn)加載磁貼顏色?)
                  Add external geojson to leaflet layer(將外部geojson添加到傳單層)
                  Adding Leaflet layer control to sidebar(將 Leaflet 圖層控件添加到側(cè)邊欄)
                • <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>
                            主站蜘蛛池模板: 国产精品一区二区久久 | 九九热在线视频观看这里只有精品 | 欧美日韩成人 | 国产午夜在线 | 久久综合久色欧美综合狠狠 | 久久99一区二区 | 日韩av一区二区在线 | 欧美精品在线一区二区三区 | 国产欧美日韩综合精品一区二区 | 国产美女久久久 | 免费av电影网站 | 精品视频在线一区 | 国产精品久久久亚洲 | m豆传媒在线链接观看 | 国产91在线播放 | 爱草在线 | 亚洲欧美一区二区三区在线 | 国产精品五区 | 偷拍自拍第一页 | 国产精品久久国产精品 | 精品一二三区视频 | 精品欧美一区二区三区久久久小说 | 一区二区三区国产好 | 激情 婷婷 | 在线免费观看a级片 | 精品国产乱码久久久久久蜜柚 | 欧美色综合 | 亚洲色欲色欲www | 久草欧美视频 | 久久久国产精品一区 | 久久久一区二区三区四区 | 凹凸日日摸日日碰夜夜 | 伊人网综合 | 午夜视频在线 | 网站黄色在线 | 成人动漫一区二区 | 午夜视频一区二区 | 成人网在线看 | 精品国产乱码久久久久久蜜臀 | 午夜黄色| 蜜桃av鲁一鲁一鲁一鲁 |