Stand-alone API for offline use

795
3
05-01-2014 04:13 AM
AlexMagruder
New Contributor III
Hey all,

I'm building a Phonegap application with ArcGIS javascript for offline data collection. To support offline collection I need a build of ArcGIS javascript that is not dependent on a server. I've found a blog that describes how to do this (http://dotnetspeak.com/2013/05/using-esri-arcgis-in-phonegap-applications), but have had no luck in trying it myself. Does anybody in the community have experience doing this? Can it be done with new releases?
0 Kudos
3 Replies
JeffPace
MVP Alum
You can download the API and run it locally, however the API and any JS applications need to be run on a web server, even if it is a local install.
0 Kudos
ReneRubalcava
Frequent Contributor
I've been using offline using PouchDB and the Application Cache. It's worked out really well for me, specifically for offline editing. The app HAS to connect to the internet at least once to grab th data and files, but after that it's good to go.

I'm going to try and transition to this offline-editor in the esri github repo.
https://github.com/Esri/offline-editor-js

It looks real promising and they solved the issue I had with Application Cache where I couldn't refresh the browser in offline mode. They just updated the documentation as well, so it's much easier to understand.
0 Kudos
AlexMagruder
New Contributor III
You can download the API and run it locally, however the API and any JS applications need to be run on a web server, even if it is a local install.


For my app I've already setup offline storage of features using webSQL and feature collection. The only step that's left is the ability to access the arcGIS javascript API offline. Is it possible to save the necessary API resources into local storage when the app is initialized and connected to the internet? Then if the app is opened and it doesn't have internet connection, it would access the api resources stored in the local storage.

Thanks for the reply.
0 Kudos