I'm trying to make an offline map. I'm working with hybrid app and it has a webview that works like a browser and my app is using openlayers.
There is a property url in the object ol.source.osm, can I set a file path, using file protocol just like 'file:///sdcard/Android', in this property?
As far as I know the browser is not allowed to access files from client-side paths or may I'm misunderstandig something?
just to be clear, all the samples that I've seen is setting this property using another way, like localhost but considering that apps does not have a web server it is not possible take this way.
Would someone help me?
Thanks in advance.
Edit
As I said, I try to set "file:///C://somepath//{z}/{x}/{y}.jpeg" in the url property and then I get this error message "Access to Image at 'file:///C://somepath//1/0/1.jpeg' from origin 'null' has been blocked by CORS policy: Invalid response. Origin 'null' is therefore not allowed access."
Is there any workaround?