When i save json file in web apps then using http://localhost:8080/WGSClient/js/object.json
this path file gets open.
But when i keep it outside web apps like local folder then using same url format json file is not accessible.
It showing error that OpenLayers doesn't support this url format.
So what is the proper url which OpenLayers support or i should keep my json file in web apps?
What would be the URL of a JSON file on the local drive?
Best Answer
Do you mean file URIs? You can try the following format
For example, if you want the file fstab at /etc/
You can also omit the host but don't omit the slash
I hope that helps.