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

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

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

      1. 來自“file://"的圖像已被跨源資源共享策略阻

        Image from origin #39;file://#39; has been blocked from loading by Cross-Origin Resource Sharing policy:(來自“file://的圖像已被跨源資源共享策略阻止加載:)
          <tbody id='8tzZT'></tbody>
        <i id='8tzZT'><tr id='8tzZT'><dt id='8tzZT'><q id='8tzZT'><span id='8tzZT'><b id='8tzZT'><form id='8tzZT'><ins id='8tzZT'></ins><ul id='8tzZT'></ul><sub id='8tzZT'></sub></form><legend id='8tzZT'></legend><bdo id='8tzZT'><pre id='8tzZT'><center id='8tzZT'></center></pre></bdo></b><th id='8tzZT'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='8tzZT'><tfoot id='8tzZT'></tfoot><dl id='8tzZT'><fieldset id='8tzZT'></fieldset></dl></div>

        <legend id='8tzZT'><style id='8tzZT'><dir id='8tzZT'><q id='8tzZT'></q></dir></style></legend>
          <tfoot id='8tzZT'></tfoot>

            <small id='8tzZT'></small><noframes id='8tzZT'>

                • <bdo id='8tzZT'></bdo><ul id='8tzZT'></ul>

                • 本文介紹了來自“file://"的圖像已被跨源資源共享策略阻止加載:的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  我正在使用 leaflet-image.js 從傳單地圖創(chuàng)建圖像.用于創(chuàng)建圖像的代碼是

                  你能幫我解決這個(gè)問題嗎?(而且我所有的服務(wù)器都是本地托管的.Webserver、mapserver ...)

                  解決方案

                  一般情況下,一個(gè)網(wǎng)站中運(yùn)行的javascript代碼不能訪問其他網(wǎng)站的資源.但是來自網(wǎng)站的 javascript 應(yīng)該能夠訪問來自同一網(wǎng)站的資源.這稱為 same-origin policy,并已實(shí)施所有主流瀏覽器(不僅僅是 Chrome).

                  也請(qǐng)閱讀 https://developer.mozilla.org/en-US/docs/Same-origin_policy_for_file:_URIs 和 禁用同源策略鉻 .

                  最快的解決方案是通過您的 localhost:8080 網(wǎng)站訪問圖像 - 然后,該網(wǎng)站中的 javascript 將能夠訪問同一網(wǎng)站中的圖像資源.

                  I'm using leaflet-image.js to create an image from a leaflet map. The code used to create the image is the one in the example at https://github.com/mapbox/leaflet-image ie

                  var map = L.mapbox.map('map', 'YOUR.MAPID').setView([38.9, -77.03], 14);
                  leafletImage(map, function(err, canvas) {
                      // now you have canvas
                      // example thing to do with that canvas:
                      var img = document.createElement('img');
                      var dimensions = map.getSize();
                      img.width = dimensions.x;
                      img.height = dimensions.y;
                      img.src = canvas.toDataURL();
                      document.getElementById('images').innerHTML = '';
                      document.getElementById('images').appendChild(img);
                  });
                  

                  The problem is that the image seems to be blocked by some CORS security feature. Below is an image of the Google Chrome console (not that enevn in firefox it does not work)

                  Could you help me with that ? (Also all my server are locally hosted. Webserver, mapserver ...)

                  解決方案

                  In general, javascript code running in a website cannot access resources from other websites. But a javascript from a website should be able to access resources from that same website. This is called same-origin policy, and is implemented by all major browsers (not just Chrome).

                  Do read also https://developer.mozilla.org/en-US/docs/Same-origin_policy_for_file:_URIs and Disable same origin policy in Chrome .

                  The quickest solution is to have the image reachable via your localhost:8080 website - then, the javascript in that website will be able to access a image resource in the same website.

                  這篇關(guān)于來自“file://"的圖像已被跨源資源共享策略阻止加載:的文章就介紹到這了,希望我們推薦的答案對(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)加載磁貼顏色?)
                  Adding Leaflet layer control to sidebar(將 Leaflet 圖層控件添加到側(cè)邊欄)
                  Leaflet - get latitude and longitude of a marker inside a pop-up(Leaflet - 在彈出窗口中獲取標(biāo)記的緯度和經(jīng)度)

                      <tbody id='rpUIL'></tbody>

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

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

                            主站蜘蛛池模板: www.亚洲区 | 九色porny自拍视频 | 一级a性色生活片久久毛片 午夜精品在线观看 | 嫩草懂你的影院入口 | 影视先锋av资源噜噜 | 亚洲精品久久久久久久久久久 | 男人天堂999 | 国产小u女发育末成年 | 精品一区二区电影 | 91视频进入 | 国产精品久久久久久久久 | 国产女人第一次做爰毛片 | 无码国模国产在线观看 | 欧美精品久久久久久久久久 | 日本国产一区二区 | 狠狠干网站 | 国产91九色 | 国产一区2区 | 一级片网址 | 午夜视频免费在线 | 亚洲国产成人精品久久久国产成人一区 | 中国av在线免费观看 | 欧美日一区二区 | 日韩精品在线播放 | 色黄网站 | 日韩欧美国产一区二区三区 | 欧美成人一区二区三区片免费 | 97av在线 | 精品久久久久久久人人人人传媒 | 蜜臀网| 毛片黄片| 国产一区二区 | 国产在线精品一区二区 | 久久精品国产一区二区电影 | 国产精品久久久久久久久久东京 | 黄色国产 | 狠狠干美女 | 欧美日韩精品中文字幕 | 久草网在线视频 | 亚洲精品久久久久国产 | 亚洲h色|