Getting CORS error while working with OpenLayers v7.5.2

24 Views Asked by At
Cross-Origin Request Blocked: 
The Same Origin Policy disallows reading the remote resource at file:///C:/Users/kalam/Documents/my-ol-app/main.js. 
(Reason: CORS request not http).

Module source URI is not allowed in this document: 
"file:///C:/Users/kalam/Documents/my-ol-app/main.js".

Getting this error while working with OpenLayers v7.5.2

Unable to know how to solve this error

0

There are 0 best solutions below