Skip to main content
Rollback to Revision 2
Source Link

I'm trying to get the image of Map from openlayersOpenLayers 4.6.5 and the following error is appearingappearing each and every time.

I'm using cdn link of openlayersOpenLayers 4.6.5 for the base Map in java-scriptJavaScript with Apache tomcatTomcat server in web-Application application (httpHTTP format) everything is working fine.

But when I start to get the image from openlayersOpenLayers Map it's giving :SecurityError: The operation is insecure.

SecurityError: The operation is insecure.

in case of FireFox

  and

Uncaught DOMException: Failed to execute 'toBlob' on 'HTMLCanvasElement': Tainted canvases may not be exported.

Uncaught DOMException: Failed to execute 'toBlob' on 'HTMLCanvasElement': Tainted canvases may not be exported.

It's really head eating and I have tried many ways like corsCORS, timeout and anything available from other sources:

   canvas.toBlob(function(blob)
            {  
             
             var imgData = new Image();
             imgData.setAttribute('crossOrigin', 'anonymous');
             imgData.src = canvas.toDataURL('png');
           }

I found out something like (I'm not sure) : it's due to security of the network i.e I'm using secure cdn link from openlayersOpenLayers :https://cdnjs.cloudflare.com/ajax/libs/openlayers/4.6.5/ol.js

https://cdnjs.cloudflare.com/ajax/libs/openlayers/4.6.5/ol.js

which is https://https:// and my application is http://http:// ---- is this a problem? I'm really tired of this.

Could anyone look into it and it would be the great help honestly.?

I'm trying to get the image of Map from openlayers 4.6.5 and the following error is appearing each and every time.

I'm using cdn link of openlayers 4.6.5 for the base Map in java-script with Apache tomcat server in web-Application (http format) everything is working fine.

But when I start to get the image from openlayers Map it's giving :SecurityError: The operation is insecure. in case of FireFox

  and

Uncaught DOMException: Failed to execute 'toBlob' on 'HTMLCanvasElement': Tainted canvases may not be exported.

It's really head eating and I have tried many ways like cors, timeout and anything available from other sources:

   canvas.toBlob(function(blob)
            {  
             
             var imgData = new Image();
             imgData.setAttribute('crossOrigin', 'anonymous');
             imgData.src = canvas.toDataURL('png');
           }

I found out something like (I'm not sure) : it's due to security of the network i.e I'm using secure cdn link from openlayers :https://cdnjs.cloudflare.com/ajax/libs/openlayers/4.6.5/ol.js which is https:// and my application is http:// ---- is this a problem? I'm really tired of this.

Could anyone look into it and it would be the great help honestly.

I'm trying to get the image of Map from OpenLayers 4.6.5 and the following error is appearing each and every time.

I'm using cdn link of OpenLayers 4.6.5 for the base Map in JavaScript with Apache Tomcat server in web application (HTTP format) everything is working fine.

But when I start to get the image from OpenLayers Map it's giving :

SecurityError: The operation is insecure.

in case of FireFox and

Uncaught DOMException: Failed to execute 'toBlob' on 'HTMLCanvasElement': Tainted canvases may not be exported.

It's really head eating and I have tried many ways like CORS, timeout and anything available from other sources:

   canvas.toBlob(function(blob)
            {  
             
             var imgData = new Image();
             imgData.setAttribute('crossOrigin', 'anonymous');
             imgData.src = canvas.toDataURL('png');
           }

I found out something like (I'm not sure) : it's due to security of the network i.e I'm using secure cdn link from OpenLayers :

https://cdnjs.cloudflare.com/ajax/libs/openlayers/4.6.5/ol.js

which is https:// and my application is http:// ---- is this a problem? I'm really tired of this.

Could anyone look into it?

Rollback to Revision 1
Source Link

I'm trying to get the image of Map from OpenLayersopenlayers 4.6.5 and the following error is appearing appearing each and every time.

I'm using cdn link of OpenLayersopenlayers 4.6.5 for the base Map in JavaScriptjava-script with Apache Tomcattomcat server in web application-Application (HTTPhttp format) everything is working fine.

But when I start to get the image from OpenLayersopenlayers Map it's giving :

SecurityError: The operation is insecure.

SecurityError: The operation is insecure. in case of FireFox 

and

Uncaught DOMException: Failed to execute 'toBlob' on 'HTMLCanvasElement': Tainted canvases may not be exported.

Uncaught DOMException: Failed to execute 'toBlob' on 'HTMLCanvasElement': Tainted canvases may not be exported.

It's really head eating and I have tried many ways like CORScors, timeout and anything available from other sources:

   canvas.toBlob(function(blob)
            {  
             
             var imgData = new Image();
             imgData.setAttribute('crossOrigin', 'anonymous');
             imgData.src = canvas.toDataURL('png');
           }

I found out something like (I'm not sure) : it's due to security of the network i.e I'm using secure cdn link from OpenLayersopenlayers :

https://cdnjs.cloudflare.com/ajax/libs/openlayers/4.6.5/ol.js

https://cdnjs.cloudflare.com/ajax/libs/openlayers/4.6.5/ol.js which is https://https:// and my application is http://http:// ---- is this a problem? I'm really tired of this.

Could anyone look into it? and it would be the great help honestly.

I'm trying to get the image of Map from OpenLayers 4.6.5 and the following error is appearing each and every time.

I'm using cdn link of OpenLayers 4.6.5 for the base Map in JavaScript with Apache Tomcat server in web application (HTTP format) everything is working fine.

But when I start to get the image from OpenLayers Map it's giving :

SecurityError: The operation is insecure.

in case of FireFox and

Uncaught DOMException: Failed to execute 'toBlob' on 'HTMLCanvasElement': Tainted canvases may not be exported.

It's really head eating and I have tried many ways like CORS, timeout and anything available from other sources:

   canvas.toBlob(function(blob)
            {  
             
             var imgData = new Image();
             imgData.setAttribute('crossOrigin', 'anonymous');
             imgData.src = canvas.toDataURL('png');
           }

I found out something like (I'm not sure) : it's due to security of the network i.e I'm using secure cdn link from OpenLayers :

https://cdnjs.cloudflare.com/ajax/libs/openlayers/4.6.5/ol.js

which is https:// and my application is http:// ---- is this a problem? I'm really tired of this.

Could anyone look into it?

I'm trying to get the image of Map from openlayers 4.6.5 and the following error is appearing each and every time.

I'm using cdn link of openlayers 4.6.5 for the base Map in java-script with Apache tomcat server in web-Application (http format) everything is working fine.

But when I start to get the image from openlayers Map it's giving :SecurityError: The operation is insecure. in case of FireFox 

and

Uncaught DOMException: Failed to execute 'toBlob' on 'HTMLCanvasElement': Tainted canvases may not be exported.

It's really head eating and I have tried many ways like cors, timeout and anything available from other sources:

   canvas.toBlob(function(blob)
            {  
             
             var imgData = new Image();
             imgData.setAttribute('crossOrigin', 'anonymous');
             imgData.src = canvas.toDataURL('png');
           }

I found out something like (I'm not sure) : it's due to security of the network i.e I'm using secure cdn link from openlayers :https://cdnjs.cloudflare.com/ajax/libs/openlayers/4.6.5/ol.js which is https:// and my application is http:// ---- is this a problem? I'm really tired of this.

Could anyone look into it and it would be the great help honestly.

naming; formatting
Source Link
Vince
  • 20.3k
  • 16
  • 48
  • 65

I'm trying to get the image of Map from openlayersOpenLayers 4.6.5 and the following error is appearingappearing each and every time.

I'm using cdn link of openlayersOpenLayers 4.6.5 for the base Map in java-scriptJavaScript with Apache tomcatTomcat server in web-Application application (httpHTTP format) everything is working fine.

But when I start to get the image from openlayersOpenLayers Map it's giving :SecurityError: The operation is insecure.

SecurityError: The operation is insecure.

in case of FireFox

  and

Uncaught DOMException: Failed to execute 'toBlob' on 'HTMLCanvasElement': Tainted canvases may not be exported.

Uncaught DOMException: Failed to execute 'toBlob' on 'HTMLCanvasElement': Tainted canvases may not be exported.

It's really head eating and I have tried many ways like corsCORS, timeout and anything available from other sources:

   canvas.toBlob(function(blob)
            {  
             
             var imgData = new Image();
             imgData.setAttribute('crossOrigin', 'anonymous');
             imgData.src = canvas.toDataURL('png');
           }

I found out something like (I'm not sure) : it's due to security of the network i.e I'm using secure cdn link from openlayersOpenLayers :https://cdnjs.cloudflare.com/ajax/libs/openlayers/4.6.5/ol.js

https://cdnjs.cloudflare.com/ajax/libs/openlayers/4.6.5/ol.js

which is https://https:// and my application is http://http:// ---- is this a problem? I'm really tired of this.

Could anyone look into it and it would be the great help honestly.?

I'm trying to get the image of Map from openlayers 4.6.5 and the following error is appearing each and every time.

I'm using cdn link of openlayers 4.6.5 for the base Map in java-script with Apache tomcat server in web-Application (http format) everything is working fine.

But when I start to get the image from openlayers Map it's giving :SecurityError: The operation is insecure. in case of FireFox

  and

Uncaught DOMException: Failed to execute 'toBlob' on 'HTMLCanvasElement': Tainted canvases may not be exported.

It's really head eating and I have tried many ways like cors, timeout and anything available from other sources:

   canvas.toBlob(function(blob)
            {  
             
             var imgData = new Image();
             imgData.setAttribute('crossOrigin', 'anonymous');
             imgData.src = canvas.toDataURL('png');
           }

I found out something like (I'm not sure) : it's due to security of the network i.e I'm using secure cdn link from openlayers :https://cdnjs.cloudflare.com/ajax/libs/openlayers/4.6.5/ol.js which is https:// and my application is http:// ---- is this a problem? I'm really tired of this.

Could anyone look into it and it would be the great help honestly.

I'm trying to get the image of Map from OpenLayers 4.6.5 and the following error is appearing each and every time.

I'm using cdn link of OpenLayers 4.6.5 for the base Map in JavaScript with Apache Tomcat server in web application (HTTP format) everything is working fine.

But when I start to get the image from OpenLayers Map it's giving :

SecurityError: The operation is insecure.

in case of FireFox and

Uncaught DOMException: Failed to execute 'toBlob' on 'HTMLCanvasElement': Tainted canvases may not be exported.

It's really head eating and I have tried many ways like CORS, timeout and anything available from other sources:

   canvas.toBlob(function(blob)
            {  
             
             var imgData = new Image();
             imgData.setAttribute('crossOrigin', 'anonymous');
             imgData.src = canvas.toDataURL('png');
           }

I found out something like (I'm not sure) : it's due to security of the network i.e I'm using secure cdn link from OpenLayers :

https://cdnjs.cloudflare.com/ajax/libs/openlayers/4.6.5/ol.js

which is https:// and my application is http:// ---- is this a problem? I'm really tired of this.

Could anyone look into it?

Source Link
Loading