From b1f436f092c4cc32f8db35762d2729dc80a976fd Mon Sep 17 00:00:00 2001 From: Andy Gup Date: Mon, 16 Jun 2014 14:48:59 -0600 Subject: [PATCH 01/25] corrections and updates to readme --- README.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 53df06a..31e1abb 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,8 @@ This repo contains the following libraries: * `offlineFeaturesManager` - Extends and overrides a feature layer. * `editsStore` - Provides static helper methods for working with the offline data store. - `/tiles`: stores portions of tiled maps client-side and uses the cached tiles when device is offline - * `offlineTilesEnabler` Extends and overrides a tiled map service. + * `offlineTilesEnabler` Extends and overrides a tiled map service from ArcGIS Online or for partial offline use. + * `OfflineTilesEnablerLayer` Extends any Esri tiled basemap service for a web app that has a requirement for browser reload and/or restart. This library should be used in conjunction with an application cache coding pattern. - `/tpk`: lets you work with TPK files. * `TPKLayer` - parses a TPK file and displays it as a tiled map layer. - `/utils`: contains various helper libraries. @@ -48,7 +49,7 @@ Extends and overrides a tiled map service. Provides the ability to customize the ##TPKLayer -Extends TileMapServiceLayer. You can display TPK files with this library. +Extends TileMapServiceLayer. You can display TPK files with this library. TPK's are binary tile package files. Go [here](http://resources.arcgis.com/en/help/main/10.1/index.html#//00170000017w000000) for more information on how to create a TPK file. * __Click [here](doc/tpklayer.md) to see the full API doc for `TPKLayer`__ @@ -81,19 +82,20 @@ Extends TileMapServiceLayer. You can display TPK files with this library. ##Dependencies * ArcGIS API for JavaScript (v3.8+) -* NOTE: browser limitations and technical dependencies. The offline capabilities in this toolkit depend on psuedo-persistent HTML5 capabilities being present in the browser. Go [here](doc/dependencies.md) for a detailed breakdown of the information. +* NOTE: browser limitations and technical dependencies. The offline capabilities in this toolkit depend on certain HTML5 capabilities being present in the browser. Go [here](doc/dependencies.md) for a detailed breakdown of the information. + * We offer browser support for Chrome and Safari only, at this time. Some of the capabilities in the repository will not work on Internet Explorer. We continue to evaluate IE's capabilities as new releases become available to try and identify a point where we might be able to support it. * Sub-modules (see `/vendor` directory) * [offline.js](https://github.com/hubspot/offline) - it allows detection of the online/offline condition and provides events to hook callbacks on when this condition changes - * [IndexedDBShim](https://github.com/axemclion/IndexedDBShim) - polyfill to simulate indexed db functionality in browsers/platforms where it is not supported (notably iOS Safari, PhoneGap, Android Chrome) - - IMPORTANT: There is a know [issue](https://github.com/axemclion/IndexedDBShim/issues/115) with IndexedDBShim on Safari. The workaround is to switch from using /dist/IndexedDBShim.min.js to just using IndexedDBShim.js and then modify line #1467 to a more appropriate size that will meet all your storage needs, for example: ```var DEFAULT_DB_SIZE = 24 * 1024 * 1024``` + * [IndexedDBShim](https://github.com/axemclion/IndexedDBShim) - polyfill to simulate indexeddb, or access WebSQL functionality in browsers/platforms where it is not supported (notably desktop Safari and iOS Safari) + - IMPORTANT: There is a know [issue](https://github.com/axemclion/IndexedDBShim/issues/115) with IndexedDBShim on Safari. The workaround is to switch from using /dist/IndexedDBShim.min.js to just using IndexedDBShim.js and then search for and modify the line that defines the value for `DEFAULT_DB_SIZE`. Set this to more appropriate size that will meet all your storage needs, for example: ```var DEFAULT_DB_SIZE = 24 * 1024 * 1024``` * [jasmine.async](https://github.com/derickbailey/jasmine.async.git) - library to help implementing tests of async functionality (used in tests) * Non sub-module based libraries * [FileSaver.js](https://github.com/Esri/offline-editor-js/blob/master/lib/tiles/README.md) - library to assist with uploading and downloading of files containing tile information. * [grunt-manifest](https://github.com/gunta/grunt-manifest) node.js library to assist with the creation of manifest files. - * [zip](http://gildas-lormeau.github.io/zip.js/) A library for zipping and unzipping files. + * [zip](http://gildas-lormeau.github.io/zip.js/) A library for zipping and unzipping files. * [xml2json](https://code.google.com/p/x2js/) A library for converting XML to JSON. Seems to handle complex XML. ## Resources From 27507d1e17b50da41a0f8814f5cab44b93591e4b Mon Sep 17 00:00:00 2001 From: Andy Gup Date: Mon, 16 Jun 2014 15:54:38 -0600 Subject: [PATCH 02/25] fixed breaking change. Instantiating bootstrap now uses create() --- samples/tiles-indexed-db.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/tiles-indexed-db.html b/samples/tiles-indexed-db.html index 85d5d11..575eb10 100644 --- a/samples/tiles-indexed-db.html +++ b/samples/tiles-indexed-db.html @@ -320,7 +320,7 @@ require( map = response.map; try{ // Bind to map - BootstrapMap.bindTo(map); + BootstrapMap.create(map); } catch(err){ console.log("boot " + err.toString()) From cbaa6c2e646e9c26b0447b32aba6b0735cdacacf Mon Sep 17 00:00:00 2001 From: Andy Gup Date: Mon, 16 Jun 2014 17:11:02 -0600 Subject: [PATCH 03/25] correctly set _lastTileUrl. Deferred causes too much of a delay. --- samples/tiles-indexed-db.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/samples/tiles-indexed-db.html b/samples/tiles-indexed-db.html index 575eb10..59448b7 100644 --- a/samples/tiles-indexed-db.html +++ b/samples/tiles-indexed-db.html @@ -414,6 +414,12 @@ require( esri.show(dojo.byId('ready-to-download-ui')); esri.hide(dojo.byId('downloading-ui')); updateOfflineUsage(); + + var cellArray = basemapLayer.getTileUrlsByExtent(map.extent,map.getLevel()); + var uriFragment = cellArray[0].split("/MapServer/"); + var rebuiltURI = uriFragment[0] + "/MapServer/tile/" + uriFragment[1]; + basemapLayer._lastTileUrl = rebuiltURI; + updateTileCountEstimation(); } else From 46cc1b8f628701a9c403240b76d19bf7b309f1b1 Mon Sep 17 00:00:00 2001 From: Andy Gup Date: Mon, 16 Jun 2014 17:12:29 -0600 Subject: [PATCH 04/25] code comment to explain the hack. --- samples/tiles-indexed-db.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/samples/tiles-indexed-db.html b/samples/tiles-indexed-db.html index 59448b7..b878d22 100644 --- a/samples/tiles-indexed-db.html +++ b/samples/tiles-indexed-db.html @@ -415,6 +415,8 @@ require( esri.hide(dojo.byId('downloading-ui')); updateOfflineUsage(); + // Hack to correctly set _lastTileUrl. It needs to be set for the tile size + // estimation to work properly. var cellArray = basemapLayer.getTileUrlsByExtent(map.extent,map.getLevel()); var uriFragment = cellArray[0].split("/MapServer/"); var rebuiltURI = uriFragment[0] + "/MapServer/tile/" + uriFragment[1]; From f80b1d5eb08ee0e28fff8b9af4bcf9ef3d6c0630 Mon Sep 17 00:00:00 2001 From: Andy Gup Date: Mon, 16 Jun 2014 17:22:01 -0600 Subject: [PATCH 05/25] input elements now terminated properly. --- samples/tiles-indexed-db.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/tiles-indexed-db.html b/samples/tiles-indexed-db.html index b878d22..1edd663 100644 --- a/samples/tiles-indexed-db.html +++ b/samples/tiles-indexed-db.html @@ -147,7 +147,7 @@
- +
@@ -155,7 +155,7 @@
- +
From bf1fa69efe011371d4225449d6715f9e7a2a8be0 Mon Sep 17 00:00:00 2001 From: Andy Gup Date: Mon, 16 Jun 2014 17:28:40 -0600 Subject: [PATCH 06/25] modified how min-level is calculated --- samples/tiles-indexed-db.html | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/samples/tiles-indexed-db.html b/samples/tiles-indexed-db.html index 1edd663..967bab0 100644 --- a/samples/tiles-indexed-db.html +++ b/samples/tiles-indexed-db.html @@ -387,7 +387,14 @@ require( on(dojo.byId('minLevel'),'change', updateTileCountEstimation); on(dojo.byId('maxLevel'),'change', updateTileCountEstimation); - dojo.byId('minLevel').value = basemapLayer.minLevel = basemapLayer.tileInfo.lods[0].level; + var currentLevel = map.getLevel(); + if(currentLevel - 3 < 0){ + dojo.byId('minLevel').value = currentLevel; + } + else{ + dojo.byId('minLevel').value = currentLevel - 3; + } + dojo.byId('maxLevel').value = basemapLayer.maxLevel = basemapLayer.tileInfo.lods[basemapLayer.tileInfo.lods.length-1].level; } From ec536fa659cf76862c056e144e14c6a16e2fb091 Mon Sep 17 00:00:00 2001 From: Andy Gup Date: Mon, 16 Jun 2014 19:12:38 -0600 Subject: [PATCH 07/25] minZoom, currentZoom, maxZoom now sync'd correctly --- samples/tiles-indexed-db.html | 41 +++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/samples/tiles-indexed-db.html b/samples/tiles-indexed-db.html index 967bab0..d60ab5f 100644 --- a/samples/tiles-indexed-db.html +++ b/samples/tiles-indexed-db.html @@ -376,6 +376,12 @@ require( function initEvents() { map.on('extent-change',debouncer.debounceMap(function(){ + var zoomLevel = map.getLevel(); + dojo.byId('currentLevel').value = zoomLevel; + var low = Math.max(basemapLayer.minLevel, zoomLevel - 3); + var high = Math.min(basemapLayer.maxLevel, zoomLevel + 4) + dojo.byId('minLevel').value = low; + dojo.byId('maxLevel').value = high; updateTileCountEstimation(); },250)); @@ -395,7 +401,9 @@ require( dojo.byId('minLevel').value = currentLevel - 3; } - dojo.byId('maxLevel').value = basemapLayer.maxLevel = basemapLayer.tileInfo.lods[basemapLayer.tileInfo.lods.length-1].level; + basemapLayer.minLevel = basemapLayer.tileInfo.lods[0].level; + basemapLayer.maxLevel = basemapLayer.tileInfo.lods[basemapLayer.tileInfo.lods.length-1].level; + updateMinMaxLayerInfo(); } function initOffline() @@ -500,20 +508,31 @@ require( }); } + function updateMinMaxLayerInfo(){ + var zoomLevel = map.getLevel(); + dojo.byId('currentLevel').value = zoomLevel; + var low = Math.max(basemapLayer.minLevel, zoomLevel - 3); + var high = Math.min(basemapLayer.maxLevel, zoomLevel + 4) + dojo.byId('minLevel').value = low; + dojo.byId('maxLevel').value = high; + } + function updateTileCountEstimation() { console.log('updating'); - var zoomLevel = map.getLevel(); - dojo.byId('currentLevel').value = zoomLevel; - var minLevel = parseInt(dojo.byId('minLevel').value); - var maxLevel = parseInt(dojo.byId('maxLevel').value); +// var values = updateMinMaxLayerInfo(); +// var zoomLevel = map.getLevel(); +// dojo.byId('currentLevel').value = zoomLevel; - if( maxLevel > zoomLevel + 4 || maxLevel > basemapLayer.maxLevel) - { - maxLevel = Math.min(basemapLayer.maxLevel, zoomLevel + 4); - dojo.byId('maxLevel').value = maxLevel; - } + var minLevel = dojo.byId('minLevel').value; + var maxLevel = dojo.byId('maxLevel').value; + +// if( maxLevel > zoomLevel + 4 || maxLevel > basemapLayer.maxLevel) +// { +// maxLevel = Math.min(basemapLayer.maxLevel, zoomLevel + 4); +// dojo.byId('maxLevel').value = maxLevel; +// } var totalEstimation = { tileCount:0, sizeBytes:0 } @@ -528,7 +547,7 @@ require( totalEstimation.tileCount += levelEstimation.tileCount; totalEstimation.sizeBytes += levelEstimation.sizeBytes; - if( levelEstimation.tileCount > 1) + if( levelEstimation.tileCount > 0) { var rowContent = [levelEstimation.level, levelEstimation.tileCount, Math.round(levelEstimation.sizeBytes / 1024 / 1024 * 100) / 100 + " Mb"] rowContent = ""; From c80a296a3f04673f7050e07fc28ae2fa26216d01 Mon Sep 17 00:00:00 2001 From: Andy Gup Date: Mon, 16 Jun 2014 19:15:39 -0600 Subject: [PATCH 08/25] correctly terminate currentZoom input element --- samples/tiles-indexed-db.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/tiles-indexed-db.html b/samples/tiles-indexed-db.html index d60ab5f..1e00370 100644 --- a/samples/tiles-indexed-db.html +++ b/samples/tiles-indexed-db.html @@ -147,11 +147,11 @@
- +
- +
From af2b3787831a66c98add417f3f74a92cf5f4afa2 Mon Sep 17 00:00:00 2001 From: Andy Gup Date: Mon, 16 Jun 2014 20:17:03 -0600 Subject: [PATCH 09/25] remove unused code --- samples/tiles-indexed-db.html | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/samples/tiles-indexed-db.html b/samples/tiles-indexed-db.html index 1e00370..9421f13 100644 --- a/samples/tiles-indexed-db.html +++ b/samples/tiles-indexed-db.html @@ -521,19 +521,9 @@ require( { console.log('updating'); -// var values = updateMinMaxLayerInfo(); -// var zoomLevel = map.getLevel(); -// dojo.byId('currentLevel').value = zoomLevel; - var minLevel = dojo.byId('minLevel').value; var maxLevel = dojo.byId('maxLevel').value; -// if( maxLevel > zoomLevel + 4 || maxLevel > basemapLayer.maxLevel) -// { -// maxLevel = Math.min(basemapLayer.maxLevel, zoomLevel + 4); -// dojo.byId('maxLevel').value = maxLevel; -// } - var totalEstimation = { tileCount:0, sizeBytes:0 } basemapLayer.estimateTileSize(function(tileSize) From 64705acdc69f401f27e67e243a82adc82f40e5e3 Mon Sep 17 00:00:00 2001 From: Andy Gup Date: Mon, 16 Jun 2014 20:43:24 -0600 Subject: [PATCH 10/25] updated how to use app cache doc --- doc/howtouseappcache.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/doc/howtouseappcache.md b/doc/howtouseappcache.md index ba71f7d..0f40964 100644 --- a/doc/howtouseappcache.md +++ b/doc/howtouseappcache.md @@ -3,11 +3,11 @@ Tips on using application cache If you have a requirement to reload your application or restart the browser while offline then you will need to use the [application cache](http://appcachefacts.info/). Some developers also use application caches to speed up page reload performance. For example, Google uses an application cache when load their main web page. -The application cache will allow you to store any file that is required for offline use. The list includes html files, JavaScript libraries, CSS and images. Any file that your application requires to run normally will have to be referenced in the application cache. +The application cache, also sometimes referred to as the 'manifest file', will allow you to store any file that is required for offline use. The list of acceptable files includes html, JavaScript libraries, CSS and images. Any file that your application requires to run normally will have to be referenced in the application cache. -Once an application is stored in the application cache it will be available the next time an application restarts. +Once an application and its associated files are stored in the application cache it will be available from the cache the next time an application restarts. -## Using AppCaches with your ArcGIS web app +## Using application caches with your ArcGIS web app **Step 1** Make sure you are using an optimized build of the ArcGIS API for JavaScript. You can create an optimized build at [http://jso.arcgis.com/](http://jso.arcgis.com/). This will create a single file that contains all the necessary modules for your app. There are options to host the build via CDN or locally. Either approach will work. @@ -22,7 +22,7 @@ NOTE: You cannot use the regular CDN for the ArcGIS API for JavaScript because t ``` -**Step 4** Be sure to include and use the `/utils/appCacheManager.js` library as a module in your application. This will enable you to monitor what's going on in the application cache and capture specific events. Here is a psuedo code example of how to instantiate it: +**Step 4** Be sure to include and use the `/utils/appCacheManager.js` library as a module in your application. This will enable you to monitor what's going on in the application cache and capture specific events. For example if you want to know when the cache file has completely finalized its loading process then you can listen for the CACHE_LOADED event. Here is a psuedo code example of how to instantiate it: ```js @@ -36,11 +36,13 @@ NOTE: You cannot use the regular CDN for the ArcGIS API for JavaScript because t In the `/samples` directory there are two examples, `appcache-features.html` and `appcache-tiles.html` that demonstrate how to use tiles, features and the appCacheManager with the application cache. ###Configuring your web server -Your web server must be able to serve up the MIME TYPE `TEXT/cache-manifest`. If this is missing there's a really good chance that the application cache file won't be served up to your app. +Your web server must be able to serve up the MIME TYPE `TEXT/cache-manifest`. If this is missing there's a really good chance that the application cache file won't be served up to your app. + +If you have your web server set up to serve no-cache headers, you should temporarily disable that feature. Some browsers will refuse to accept the application cache file if it is served via a no-cache header. ### Clearing the application cache in a browser -When you do testing with an application cache, any time you make a change to your application HTML, CSS or JS you will need to delete the existing application cache. Otherwise, any changes you make will not be reflected in the app. +When you do testing with an application cache, any time you make a change to your application HTML, CSS or JS you will need to delete the existing application cache. Otherwise, any changes you make will not be reflected in the app. **Simply deleting your web cache the normal way won't clear an application cache!** @@ -48,6 +50,8 @@ In Chrome you can navigate to chrome://appcache-internals/ then select the appro In Safari iPhone and iPad go to settings and select "Clear Cookies and Data." +Safari on desktop can be alot more tricky. Simply attempting Develop > Empty Caches may not work. On a Mac you will have to: close your browser, manually delete the .db file by going to //library/Caches/com.Apple.Safari and move any item ending in .db to the trash, then restart browser. If this doesn't work then try restarting your machine. Yep, it's an awful workflow and it's been a known bug in Safari dating back to atleast version 6. + If you want to test on Firefox then try Tools > Options > Advanced > Network > Offline data > Clear Now. More info is available [here](https://developer.mozilla.org/en-US/docs/Web/HTML/Using_the_application_cache#Storage_location_and_clearing_the_offline_cache). As for IE, this library doesn't currently support any versions. From cc89c058624424758e9f2eada0088dd3f70d5e9a Mon Sep 17 00:00:00 2001 From: Andy Gup Date: Tue, 17 Jun 2014 11:31:50 -0600 Subject: [PATCH 11/25] Fixes #203 - Safari application cache bug --- samples/Gruntfile.js | 1 - samples/appcache-features.appcache | 10 +--------- samples/appcache-tiles.appcache | 8 -------- 3 files changed, 1 insertion(+), 18 deletions(-) diff --git a/samples/Gruntfile.js b/samples/Gruntfile.js index b252984..6d4865c 100644 --- a/samples/Gruntfile.js +++ b/samples/Gruntfile.js @@ -60,7 +60,6 @@ module.exports = function(grunt) { timestamp: true }, src: [ - "*.html", "../samples/images/*.png", "../samples/css/*.css", "../vendor/IndexedDBShim/dist/*.js", diff --git a/samples/appcache-features.appcache b/samples/appcache-features.appcache index e5d5362..64547ed 100644 --- a/samples/appcache-features.appcache +++ b/samples/appcache-features.appcache @@ -1,6 +1,6 @@ CACHE MANIFEST # This manifest was generated by grunt-manifest HTML5 Cache Manifest Generator -# Time: Wed Jun 11 2014 13:42:14 GMT-0600 (MDT) +# Time: Tue Jun 17 2014 11:23:22 GMT-0600 (MDT) CACHE: # manifest-generator, version: 0.0.1 @@ -34,14 +34,6 @@ http://js.arcgis.com/3.9/js/esri/dijit/images/ajax-loader.gif # required local html # /xyz/style.css # /img/1.png -appcache-features.html -appcache-tiles.html -attachments-editor-online.html -attachments-editor.html -military-offline.html -service-inspector.html -tiles-indexed-db.html -tpk-layer.html ../samples/images/blue-pin.png ../samples/images/red-pin.png ../samples/css/modular-popup.css diff --git a/samples/appcache-tiles.appcache b/samples/appcache-tiles.appcache index 5cf018f..bfb2d75 100644 --- a/samples/appcache-tiles.appcache +++ b/samples/appcache-tiles.appcache @@ -32,14 +32,6 @@ http://js.arcgis.com/3.9/js/esri/dijit/images/ajax-loader.gif # required local html # /xyz/style.css # /img/1.png -appcache-features.html -appcache-tiles.html -attachments-editor-online.html -attachments-editor.html -military-offline.html -service-inspector.html -tiles-indexed-db.html -tpk-layer.html ../samples/images/blue-pin.png ../samples/images/red-pin.png ../vendor/IndexedDBShim/dist/IndexedDBShim.min.js From bebac85d456b494dea4cdd594a049851690aa8f9 Mon Sep 17 00:00:00 2001 From: Andy Gup Date: Tue, 8 Jul 2014 10:23:35 -0600 Subject: [PATCH 12/25] deprecated military sample --- samples/military-offline.html | 417 ---------------------------------- 1 file changed, 417 deletions(-) delete mode 100644 samples/military-offline.html diff --git a/samples/military-offline.html b/samples/military-offline.html deleted file mode 100644 index 8804371..0000000 --- a/samples/military-offline.html +++ /dev/null @@ -1,417 +0,0 @@ - - - - - Military Offline Editor - - - - - - - - - - - - - - - - -
-
- -
-
-
unknown
-
-
-
Storage used: 0 MBs
-
-
- - - - -
    -
    -
    -
    -
    -
    -
    -
    -
    - - \ No newline at end of file From 58c3b4d34daa0f063d96df1330da4fd5f307f840 Mon Sep 17 00:00:00 2001 From: Andy Gup Date: Tue, 8 Jul 2014 10:24:32 -0600 Subject: [PATCH 13/25] fixed proxy bug --- lib/tiles/OfflineTilesEnablerLayer.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/tiles/OfflineTilesEnablerLayer.js b/lib/tiles/OfflineTilesEnablerLayer.js index fbaa720..6e3045b 100644 --- a/lib/tiles/OfflineTilesEnablerLayer.js +++ b/lib/tiles/OfflineTilesEnablerLayer.js @@ -673,8 +673,7 @@ define([ */ _getTileInfoPrivate: function(url, callback){ var req = new XMLHttpRequest(); - var urlTag = "?" + url + "?f=pjson"; - var url = this.offline.proxyPath? this.offline.proxyPath + urlTag : urlTag; + var url = this.offline.proxyPath? this.offline.proxyPath + "?" + url + "?f=pjson" : url + "?f=pjson"; req.open("GET", url, true); req.onload = function() { From 3cafcaaef53aac98388b14ad3b830c2c1ec88d9b Mon Sep 17 00:00:00 2001 From: Andy Gup Date: Tue, 8 Jul 2014 10:28:31 -0600 Subject: [PATCH 14/25] deprecated attachment-editor-online.html --- samples/attachments-editor-online.html | 87 -------------------------- 1 file changed, 87 deletions(-) delete mode 100644 samples/attachments-editor-online.html diff --git a/samples/attachments-editor-online.html b/samples/attachments-editor-online.html deleted file mode 100644 index bfe9a3f..0000000 --- a/samples/attachments-editor-online.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - SanFrancisco311 - Incidents - - - - - - - - - -
    - -
    - - -
    - - From 09407218ce0cd8482f4b1478a80a153fe4d55a17 Mon Sep 17 00:00:00 2001 From: Andy Gup Date: Tue, 8 Jul 2014 10:34:37 -0600 Subject: [PATCH 15/25] Explicitly declare proxyPath = null --- samples/appcache-features.html | 2 ++ samples/appcache-tiles.html | 2 ++ samples/tiles-indexed-db.html | 3 ++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/samples/appcache-features.html b/samples/appcache-features.html index 02a9439..33c7854 100644 --- a/samples/appcache-features.html +++ b/samples/appcache-features.html @@ -259,6 +259,8 @@ console.log("Tile Layer Loaded."); },_isOnline); + tileLayer.offline.proxyPath = null; + var map = new Map("map",{ center: [-104.98,39.74], // long, lat zoom: 8, diff --git a/samples/appcache-tiles.html b/samples/appcache-tiles.html index 1ec89be..e0829cc 100644 --- a/samples/appcache-tiles.html +++ b/samples/appcache-tiles.html @@ -157,6 +157,8 @@ require(["esri/map","utils/appCacheManager","tiles/OfflineTilesEnablerLayer","do console.log("Offline tile lib is enabled. Application state is: " + Offline.state); },_isOnline); + tileLayer.offline.proxyPath = null; + map.on("load",function(evt){ init(); diff --git a/samples/tiles-indexed-db.html b/samples/tiles-indexed-db.html index 9421f13..d65e5ba 100644 --- a/samples/tiles-indexed-db.html +++ b/samples/tiles-indexed-db.html @@ -414,7 +414,8 @@ require( { if(success) { - basemapLayer.offline.proxyPath = window.proxyPath || "../lib/resource-proxy/proxy.php"; + //basemapLayer.offline.proxyPath = window.proxyPath || "../lib/resource-proxy/proxy.php"; + basemapLayer.offline.proxyPath = null; //We are using CORS on(dojo.byId('prepare-for-offline-btn'),'click', prepareForOffline); on(dojo.byId('cancel-btn'),'click', cancel); on(dojo.byId('delete-all-tiles-btn'),'click', deleteAllTiles); From 298300c104077e0493425e48a8b471f0cc17b7a7 Mon Sep 17 00:00:00 2001 From: Andy Gup Date: Tue, 8 Jul 2014 10:45:27 -0600 Subject: [PATCH 16/25] updated readme --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 31e1abb..df9611d 100644 --- a/README.md +++ b/README.md @@ -73,10 +73,10 @@ Extends TileMapServiceLayer. You can display TPK files with this library. TPK's * `appcache-features.html` - shows how to work with the application manifest, tiles and features. * `appcache-tiles.html` - shows how to work with the application manifest and map tiles. * `attachments-editor.html` - demonstrates how to work with this library and feature attachments. -* `military-offline.html` - shows working with points, lines and polygons locally. * `tpklayer.html` - shows how to work with TPK files. * `tiles-indexed-db.html` - shows how to work with storing tiles locally. * `Gruntfile.js` - a node.js app and its associated `package.json` file to help with creating an application manifest file. +* ~~`military-offline.html`~~ - (Deprecated and no longer maintained.) It's still available in commit history if you want to refer to it. We recommend using appcache-features.html and appcache-tiles.html. Those two apps support the ability to restart and reload while intermittently or fully offline. ##Dependencies @@ -89,7 +89,8 @@ Extends TileMapServiceLayer. You can display TPK files with this library. TPK's * [offline.js](https://github.com/hubspot/offline) - it allows detection of the online/offline condition and provides events to hook callbacks on when this condition changes * [IndexedDBShim](https://github.com/axemclion/IndexedDBShim) - polyfill to simulate indexeddb, or access WebSQL functionality in browsers/platforms where it is not supported (notably desktop Safari and iOS Safari) - - IMPORTANT: There is a know [issue](https://github.com/axemclion/IndexedDBShim/issues/115) with IndexedDBShim on Safari. The workaround is to switch from using /dist/IndexedDBShim.min.js to just using IndexedDBShim.js and then search for and modify the line that defines the value for `DEFAULT_DB_SIZE`. Set this to more appropriate size that will meet all your storage needs, for example: ```var DEFAULT_DB_SIZE = 24 * 1024 * 1024``` + - IMPORTANT: There are several known issues with this shim on Safari 7. [Issue #115](https://github.com/axemclion/IndexedDBShim/issues/115) and [Issue 144](https://github.com/axemclion/IndexedDBShim/issues/144). The workaround both of of these is to switch from using /dist/IndexedDBShim.min.js to just using IndexedDBShim.js and making the suggested changes if you are having problems. + - For issue #115 search for and modify the line that defines the value for `DEFAULT_DB_SIZE`. Set this to more appropriate size that will meet all your storage needs, for example: ```var DEFAULT_DB_SIZE = 24 * 1024 * 1024``` * [jasmine.async](https://github.com/derickbailey/jasmine.async.git) - library to help implementing tests of async functionality (used in tests) * Non sub-module based libraries From bdbd8ffa53ff5ca7d7e847d496ac2165d840f0fd Mon Sep 17 00:00:00 2001 From: Andy Gup Date: Tue, 8 Jul 2014 10:49:01 -0600 Subject: [PATCH 17/25] corrected minor typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index df9611d..2ad6d89 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ Extends TileMapServiceLayer. You can display TPK files with this library. TPK's * [Learn more about using the `tile` library](doc/howtousetiles.md) * [Learn more about using the `edit` library](doc/howtouseeditlibrary.md) * [Learn more about using the `tpk` library](doc/howtousetpklibrary.md) -* [Learn more abuut using an application cache with this library](doc/howtouseappcache.md) +* [Learn more about using an application cache with this library](doc/howtouseappcache.md) ##Setup Instructions From 04c5659b96a80f74c507fccb3c04655b8727d435 Mon Sep 17 00:00:00 2001 From: Andy Gup Date: Tue, 8 Jul 2014 11:12:53 -0600 Subject: [PATCH 18/25] renamed sample --- samples/draw-pointlinepoly-offline.html | 417 ++++++++++++++++++++++++ 1 file changed, 417 insertions(+) create mode 100644 samples/draw-pointlinepoly-offline.html diff --git a/samples/draw-pointlinepoly-offline.html b/samples/draw-pointlinepoly-offline.html new file mode 100644 index 0000000..8804371 --- /dev/null +++ b/samples/draw-pointlinepoly-offline.html @@ -0,0 +1,417 @@ + + + + + Military Offline Editor + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    unknown
    +
    +
    +
    Storage used: 0 MBs
    +
    +
    + + + + +
      +
      +
      +
      +
      +
      +
      +
      +
      + + \ No newline at end of file From 0ca5293df58c10e23420eee7282f707b0be350ba Mon Sep 17 00:00:00 2001 From: Andy Gup Date: Tue, 8 Jul 2014 11:16:15 -0600 Subject: [PATCH 19/25] updated readme --- README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 2ad6d89..0c424a7 100644 --- a/README.md +++ b/README.md @@ -73,10 +73,10 @@ Extends TileMapServiceLayer. You can display TPK files with this library. TPK's * `appcache-features.html` - shows how to work with the application manifest, tiles and features. * `appcache-tiles.html` - shows how to work with the application manifest and map tiles. * `attachments-editor.html` - demonstrates how to work with this library and feature attachments. +* ~~`military-offline.html`~~ - renamed `draw-pointlinepoly-offline.html` shows working with points, lines and polygons locally. * `tpklayer.html` - shows how to work with TPK files. * `tiles-indexed-db.html` - shows how to work with storing tiles locally. * `Gruntfile.js` - a node.js app and its associated `package.json` file to help with creating an application manifest file. -* ~~`military-offline.html`~~ - (Deprecated and no longer maintained.) It's still available in commit history if you want to refer to it. We recommend using appcache-features.html and appcache-tiles.html. Those two apps support the ability to restart and reload while intermittently or fully offline. ##Dependencies @@ -88,9 +88,8 @@ Extends TileMapServiceLayer. You can display TPK files with this library. TPK's * Sub-modules (see `/vendor` directory) * [offline.js](https://github.com/hubspot/offline) - it allows detection of the online/offline condition and provides events to hook callbacks on when this condition changes - * [IndexedDBShim](https://github.com/axemclion/IndexedDBShim) - polyfill to simulate indexeddb, or access WebSQL functionality in browsers/platforms where it is not supported (notably desktop Safari and iOS Safari) - - IMPORTANT: There are several known issues with this shim on Safari 7. [Issue #115](https://github.com/axemclion/IndexedDBShim/issues/115) and [Issue 144](https://github.com/axemclion/IndexedDBShim/issues/144). The workaround both of of these is to switch from using /dist/IndexedDBShim.min.js to just using IndexedDBShim.js and making the suggested changes if you are having problems. - - For issue #115 search for and modify the line that defines the value for `DEFAULT_DB_SIZE`. Set this to more appropriate size that will meet all your storage needs, for example: ```var DEFAULT_DB_SIZE = 24 * 1024 * 1024``` + * [IndexedDBShim](https://github.com/axemclion/IndexedDBShim) - polyfill to simulate indexedDB functionality in browsers/platforms where it is not supported (notably desktop Safari and iOS Safari) + - IMPORTANT: There is a known [issue](https://github.com/axemclion/IndexedDBShim/issues/115) with IndexedDBShim on Safari. The workaround is to switch from using /dist/IndexedDBShim.min.js to just using IndexedDBShim.js and then search for and modify the line that defines the value for `DEFAULT_DB_SIZE`. Set this to more appropriate size that will meet all your storage needs, for example: ```var DEFAULT_DB_SIZE = 24 * 1024 * 1024``` * [jasmine.async](https://github.com/derickbailey/jasmine.async.git) - library to help implementing tests of async functionality (used in tests) * Non sub-module based libraries From 552797bf9d982cf2fb6f611597f6460660507ff1 Mon Sep 17 00:00:00 2001 From: Javier Abadia Date: Wed, 16 Jul 2014 09:27:59 -0700 Subject: [PATCH 20/25] this piece of code broke if we had tiles coming from a tpk in our indexeddb --- lib/tiles/offlineTilesEnabler.js | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/lib/tiles/offlineTilesEnabler.js b/lib/tiles/offlineTilesEnabler.js index 33e55c2..aeefcb7 100644 --- a/lib/tiles/offlineTilesEnabler.js +++ b/lib/tiles/offlineTilesEnabler.js @@ -255,20 +255,33 @@ define([ */ layer.getTilePolygons = function(callback) // callback(Polygon polygon) or callback(null, error) { + var components, level, col, row, cellId, polygon; + var store = this.offline.store; var tilingScheme = new TilingScheme(this); store.getAllTiles(function(url,img,err) { if(url) { - var components = url.split("/"); - var level = parseInt(components[ components.length - 3],10); - var col = parseInt(components[ components.length - 2],10); - var row = parseInt(components[ components.length - 1],10); - var cellId = [row,col]; - var polygon = tilingScheme.getCellPolygonFromCellId(cellId, level); - //if( level == 15) - callback(polygon); + if(url.indexOf("_alllayers") != -1) + { + // V101/LAYERS/_alllayers/L01/R0C18C0B10 + components = url.split("/"); + level = parseInt(components[ components.length - 2].slice(1),10); + // how to extract row and col? + //col = parseInt( components[ components.length -1]); + //row = parseInt( components[ components.length -1]); + } + else + { + components = url.split("/"); + level = parseInt(components[ components.length - 3],10); + col = parseInt(components[ components.length - 2],10); + row = parseInt(components[ components.length - 1],10); + cellId = [row,col]; + polygon = tilingScheme.getCellPolygonFromCellId(cellId, level); + callback(polygon); + } } else { From ab53a32f1ecea821df8cb187f3fed8e523fd1bbc Mon Sep 17 00:00:00 2001 From: Javier Abadia Date: Wed, 16 Jul 2014 13:22:30 -0700 Subject: [PATCH 21/25] fixed show tiles - now we only show tiles that belong to the same basemap --- lib/tiles/offlineTilesEnabler.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/lib/tiles/offlineTilesEnabler.js b/lib/tiles/offlineTilesEnabler.js index aeefcb7..2e20fa7 100644 --- a/lib/tiles/offlineTilesEnabler.js +++ b/lib/tiles/offlineTilesEnabler.js @@ -261,16 +261,15 @@ define([ var tilingScheme = new TilingScheme(this); store.getAllTiles(function(url,img,err) { - if(url) + if(url && url.indexOf(layer.url) == 0) { if(url.indexOf("_alllayers") != -1) { // V101/LAYERS/_alllayers/L01/R0C18C0B10 components = url.split("/"); level = parseInt(components[ components.length - 2].slice(1),10); - // how to extract row and col? - //col = parseInt( components[ components.length -1]); - //row = parseInt( components[ components.length -1]); + col = parseInt( components[ components.length -1].substring(1,5), 16); + row = parseInt( components[ components.length -1].substring(6,10), 16); } else { @@ -278,14 +277,17 @@ define([ level = parseInt(components[ components.length - 3],10); col = parseInt(components[ components.length - 2],10); row = parseInt(components[ components.length - 1],10); - cellId = [row,col]; - polygon = tilingScheme.getCellPolygonFromCellId(cellId, level); - callback(polygon); } + cellId = [row,col]; + polygon = tilingScheme.getCellPolygonFromCellId(cellId, level); + callback(polygon); } else { - callback(null,err); + if(!url) + { + callback(null,err); + } } }); }; From cf9080d574d9822f946aae6f87e044046ce471e5 Mon Sep 17 00:00:00 2001 From: Javier Abadia Date: Wed, 16 Jul 2014 13:26:23 -0700 Subject: [PATCH 22/25] totally fix show tiles --- lib/tiles/OfflineTilesEnablerLayer.js | 7 +++++-- lib/tiles/offlineTilesEnabler.js | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/tiles/OfflineTilesEnablerLayer.js b/lib/tiles/OfflineTilesEnablerLayer.js index 6e3045b..385dce4 100644 --- a/lib/tiles/OfflineTilesEnablerLayer.js +++ b/lib/tiles/OfflineTilesEnablerLayer.js @@ -355,7 +355,7 @@ define([ var tilingScheme = new TilingScheme(this); store.getAllTiles(function(url,img,err) { - if(url) + if(url && url.indexOf(layer.url) == 0) { var components = url.split("/"); var level = parseInt(components[ components.length - 3],10); @@ -368,7 +368,10 @@ define([ } else { - callback(null,err); + if(!url) + { + callback(null,err); + } } }); }, diff --git a/lib/tiles/offlineTilesEnabler.js b/lib/tiles/offlineTilesEnabler.js index 2e20fa7..d732e85 100644 --- a/lib/tiles/offlineTilesEnabler.js +++ b/lib/tiles/offlineTilesEnabler.js @@ -124,7 +124,7 @@ define([ return tileid; }; - callback(true); + callback && callback(true); } }.bind(this)); } From 4b03157e88067ba482fa529bbf945dc2bca25b2d Mon Sep 17 00:00:00 2001 From: Andy Gup Date: Fri, 25 Jul 2014 14:26:56 -0600 Subject: [PATCH 23/25] Check for attachments store --- lib/edit/offlineFeaturesManager.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/edit/offlineFeaturesManager.js b/lib/edit/offlineFeaturesManager.js index b652113..fd7f251 100644 --- a/lib/edit/offlineFeaturesManager.js +++ b/lib/edit/offlineFeaturesManager.js @@ -31,6 +31,7 @@ define([ ONLINE: "online", // all edits will directly go to the server OFFLINE: "offline", // edits will be enqueued RECONNECTING: "reconnecting", // sending stored edits to the server + attachmentsStore: null, // indexedDB for storing attachments // manager emits event when... events: { @@ -503,7 +504,7 @@ define([ this._replayStoredEdits(function(success,responses) { var result = { features: { success:success, responses: responses} }; - if( this.attachmentsStore ) + if( this.attachmentsStore != null ) { console.log("sending attachments"); this._sendStoredAttachments(function(success, responses) @@ -836,6 +837,13 @@ define([ if(optimizedEdits.hasOwnProperty(layerUrl)) { layer = this._featureLayers[ layerUrl ]; + + if(this.attachmentsStore == null && layer.hasAttachments){ + console.log("ERROR: you need to run OfflineFeaturesManager.initAttachments(). Check the Attachments doc for more info.") + throw new Error("OfflineFeaturesManager: Attachments aren't initialized."); + } + layer._attachmentsStore = this.attachmentsStore; + layerEdits = optimizedEdits[layerUrl]; console.assert(Object.keys(layerEdits).length !== 0); @@ -894,7 +902,7 @@ define([ layer.onEditsComplete = layer.__onEditsComplete; delete layer.__onEditsComplete; layer.onBeforeApplyEdits = layer.__onBeforeApplyEdits; delete layer.__onBeforeApplyEdits; var newObjectIds = addResults.map(function(r){ return r.objectId; }); - if( layer.hasAttachments && tempObjectIds.length > 0) + if( layer._attachmentsStore != null && layer.hasAttachments && tempObjectIds.length > 0) { layer._replaceFeatureIds(tempObjectIds,newObjectIds,function(success) { From ef87da5ed17931a9d593cd2944f35a8ed2200323 Mon Sep 17 00:00:00 2001 From: Andy Gup Date: Fri, 25 Jul 2014 14:36:47 -0600 Subject: [PATCH 24/25] added code comments --- lib/edit/offlineFeaturesManager.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/edit/offlineFeaturesManager.js b/lib/edit/offlineFeaturesManager.js index fd7f251..d3ff319 100644 --- a/lib/edit/offlineFeaturesManager.js +++ b/lib/edit/offlineFeaturesManager.js @@ -838,10 +838,14 @@ define([ { layer = this._featureLayers[ layerUrl ]; + // If the layer has attachments then check to see if the attachmentsStore has been initialized if(this.attachmentsStore == null && layer.hasAttachments){ console.log("ERROR: you need to run OfflineFeaturesManager.initAttachments(). Check the Attachments doc for more info.") throw new Error("OfflineFeaturesManager: Attachments aren't initialized."); } + + // Assign the attachmentsStore to the layer as a private var so we can access it from + // the promises applyEdits() method. layer._attachmentsStore = this.attachmentsStore; layerEdits = optimizedEdits[layerUrl]; @@ -902,6 +906,8 @@ define([ layer.onEditsComplete = layer.__onEditsComplete; delete layer.__onEditsComplete; layer.onBeforeApplyEdits = layer.__onBeforeApplyEdits; delete layer.__onBeforeApplyEdits; var newObjectIds = addResults.map(function(r){ return r.objectId; }); + + // We use a different pattern if the attachmentsStore is valid and the layer has attachments if( layer._attachmentsStore != null && layer.hasAttachments && tempObjectIds.length > 0) { layer._replaceFeatureIds(tempObjectIds,newObjectIds,function(success) From 5e37f80bb85b0cd97c5e946c2015ed55839cb4a0 Mon Sep 17 00:00:00 2001 From: Andy Gup Date: Sat, 26 Jul 2014 14:50:15 -0600 Subject: [PATCH 25/25] routine update of README --- README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 0c424a7..c5eba8a 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ offline-editor-js ================= -A prototype JavaScript toolkit for using the ArcGIS API for JavaScript offline. It manages both editing and tiles in an offline mode. It's still a work-in-progress so if you have suggestions open an issue or if you want to make a pull request we welcome your proposed modifications. +A prototype JavaScript toolkit for using the ArcGIS API for JavaScript offline. It offers both lightweight editing and tile management capabilities while offline or intermittently offline. It's still a work-in-progress so if you have suggestions open an issue or if you want to make a pull request we welcome your proposed modifications. *IMPORTANT:* If you want a full, robust offline solution then you should be using our ArcGIS Runtime SDKs for .NET, WPF, Java, iOS, Android and Qt. @@ -10,6 +10,7 @@ This repo contains the following libraries: - `/edit`: handles vector features and stores adds, updates and deletes while offline. Resync's edits with server once connection is reestablished * `offlineFeaturesManager` - Extends and overrides a feature layer. * `editsStore` - Provides static helper methods for working with the offline data store. + * `attachmentsStore` - Provides limited support for attachments. - `/tiles`: stores portions of tiled maps client-side and uses the cached tiles when device is offline * `offlineTilesEnabler` Extends and overrides a tiled map service from ArcGIS Online or for partial offline use. * `OfflineTilesEnablerLayer` Extends any Esri tiled basemap service for a web app that has a requirement for browser reload and/or restart. This library should be used in conjunction with an application cache coding pattern. @@ -29,7 +30,7 @@ The following workflow is currently supported for both both features and tiles: 4) Return online when you want to resync edits. -Using an [application manifest](https://developer.mozilla.org/en-US/docs/HTML/Using_the_application_cache) allows you to reload and restart the application while offline. The application manifest let's you store .html, .js, .css and image files locally. +Using an [application manifest](https://developer.mozilla.org/en-US/docs/HTML/Using_the_application_cache) allows you to reload and restart the application while offline. The application manifest lets you store .html, .js, .css and image files locally. __Attachment Support__: Attachments are supported with some limitations. See documentation [here](./doc/attachments.md) @@ -72,7 +73,7 @@ Extends TileMapServiceLayer. You can display TPK files with this library. TPK's ##Samples * `appcache-features.html` - shows how to work with the application manifest, tiles and features. * `appcache-tiles.html` - shows how to work with the application manifest and map tiles. -* `attachments-editor.html` - demonstrates how to work with this library and feature attachments. +* `attachments-editor.html` - demonstrates how to work with this library using feature attachments. * ~~`military-offline.html`~~ - renamed `draw-pointlinepoly-offline.html` shows working with points, lines and polygons locally. * `tpklayer.html` - shows how to work with TPK files. * `tiles-indexed-db.html` - shows how to work with storing tiles locally. @@ -83,13 +84,13 @@ Extends TileMapServiceLayer. You can display TPK files with this library. TPK's * ArcGIS API for JavaScript (v3.8+) * NOTE: browser limitations and technical dependencies. The offline capabilities in this toolkit depend on certain HTML5 capabilities being present in the browser. Go [here](doc/dependencies.md) for a detailed breakdown of the information. - * We offer browser support for Chrome and Safari only, at this time. Some of the capabilities in the repository will not work on Internet Explorer. We continue to evaluate IE's capabilities as new releases become available to try and identify a point where we might be able to support it. +* We offer browser support for Chrome and Safari only, at this time. Some of the capabilities in the repository will not work on Internet Explorer. We continue to evaluate IE's capabilities as new releases become available to try and identify a point where we might be able to support it. * Sub-modules (see `/vendor` directory) * [offline.js](https://github.com/hubspot/offline) - it allows detection of the online/offline condition and provides events to hook callbacks on when this condition changes * [IndexedDBShim](https://github.com/axemclion/IndexedDBShim) - polyfill to simulate indexedDB functionality in browsers/platforms where it is not supported (notably desktop Safari and iOS Safari) - - IMPORTANT: There is a known [issue](https://github.com/axemclion/IndexedDBShim/issues/115) with IndexedDBShim on Safari. The workaround is to switch from using /dist/IndexedDBShim.min.js to just using IndexedDBShim.js and then search for and modify the line that defines the value for `DEFAULT_DB_SIZE`. Set this to more appropriate size that will meet all your storage needs, for example: ```var DEFAULT_DB_SIZE = 24 * 1024 * 1024``` + - IMPORTANT: There are known [issues](https://github.com/axemclion/IndexedDBShim/issues/115) with IndexedDBShim on Safari. For Safari, the storage error workaround is to switch from using /dist/IndexedDBShim.min.js to just using IndexedDBShim.js and then search for and modify the line that defines the value for `DEFAULT_DB_SIZE`. Set this to more appropriate size that will meet all your storage needs, for example: ```var DEFAULT_DB_SIZE = 24 * 1024 * 1024``` * [jasmine.async](https://github.com/derickbailey/jasmine.async.git) - library to help implementing tests of async functionality (used in tests) * Non sub-module based libraries
      " + rowContent.join("") + "