Closed RawenW closed 7 years ago
@RawenW make sure to run the entire github project from within a webserver directory. Also make sure to always use http or https to run the app, for example: http://localhost/offline-editor-js/samples/tpk-layer.html. Let me know if that fixes it or not?
@andygup Thanks for reply! That can be the problem. My goal is create .html file (with .js, .tpk and .css files), which will works on every pc where is not internet (full offline). That will look like desktop application, where users will be able work with map and export some data to xml. I can't use for this purpose some Runtime SDK. Is even possible create .html file, which will be able work with map (.tpk file) without the internet, i mean like desktop application?
Hi,
Without much knowledge about the issue, I recommend using Electron which could solve this for you. Atleast you'd get a full desktop application out of it, without the normal limitations of an offline html file.
@tumenor Thanks for idea, but that is not exactly what i want. I have my own application, which is able shows .html files and gives user some utilities. But, for that i need to have workable .html file.
@RawenW For plain old JavaScript applications that aren't using Electron that need to work cross-browser, the correct approach is to use Application Cache (a.k.a AppCache or Cache Manifest). All the fully offline samples in this repo use Application Cache.
Service Workers is another alternative, but that approach doesn't support Windows or iOS.
Here are couple of links that will help:
@andygup Thanks! So, if i good understand, i have to have all address to files from "ArcGIS API for JavaScript" added in .appcache right?
Sorry for the delay, there's quite a bit more to an .appcache. Have you been able to read the above links? There is also an example appcache and corresponding html file in the /samples
directory.
@RawenW I'm going to go ahead and close this. If you have any additional issues feel free to reopen this or create a new issue.
Hello, i am very interesting about this solution, but i dont know what i am doing wrong. I downloaded this project on https://github.com/Esri/offline-editor-js and i wanted open tpk-layer.html file (in chrome/firefox/ie). Everytime i get some errors after start and nothing works..
But, when i try open it from internet (on http://esri.github.io/offline-editor-js/samples/tpk-layer.html) everything working great. What am i doing wrong? Need it something special for work?
thank for every reply!