久久久久久久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://"的圖像已被跨源資源共享策略阻止加載:的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

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

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

                  解決方案

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

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

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

                  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.

                  這篇關于來自“file://"的圖像已被跨源資源共享策略阻止加載:的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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 - 在彈出窗口中獲取標記的緯度和經度)

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

                            主站蜘蛛池模板: 中文字幕第7页 | 精品视频在线观看 | 国产一区三区视频 | 欧美aa在线| 国产不卡一区在线观看 | 久久精品小视频 | 欧美一级大片免费看 | 国产成人在线视频 | 视频一区二区在线观看 | 国产欧美日韩视频 | 成人国产精品免费观看 | 最近最新中文字幕 | 国产精品高潮呻吟久久av野狼 | 日韩在线播放av | 亚洲三区在线观看 | 成人欧美一区二区三区在线播放 | 国产一区二区三区免费 | 久久性色| 国产精品久久久久无码av | 黄色免费网址大全 | 亚洲视频一区在线观看 | 国产成人精品一区二区三区视频 | 久久久www | 精品久久一区 | 久久久久国产成人精品亚洲午夜 | 亚洲精品久久久一区二区三区 | 日韩一二区在线观看 | 99精品99| 精品国产不卡一区二区三区 | 欧美11一13sex性hd| 久久99国产精一区二区三区 | 91在线色视频 | 亚洲一区二区成人 | 成人依人| 久久免费大片 | 在线免费毛片 | av中文在线 | 羞羞的视频在线看 | 成人欧美一区二区三区黑人孕妇 | 欧美综合国产精品久久丁香 | 99精品国产在热久久 |