Skip to content

Commit

Permalink
v2.9.1
Browse files Browse the repository at this point in the history
  • Loading branch information
andygup committed May 29, 2015
1 parent b6be8de commit 31a4d7f
Show file tree
Hide file tree
Showing 11 changed files with 46 additions and 16 deletions.
13 changes: 11 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
# offline-editor-js - Changelog

## Version 2.9.1 - May 28, 2015

No breaking changes.

**Enhancements**
* Initializes internal featureCollectionObject when a layer is extended.
* Added property `OfflineFeaturesManager.ENABLE_FEATURECOLLECTION`. Default value is `false`. When enabled this will
allow the library to automatically create a snapshot of the feature layer.

## Version 2.9 - May 27, 2015

No breaking changes.

**Enhancements**
* Closes #341 - Improved use of keys and indexes in editsStore.js. Minor tweaks at this time.
* Closes #342 - Automates featureCollection management. New method `offlineFeaturesManager.getFeatureCollections()`.
* Closes #327 - Improved use of keys and indexes in editsStore.js. Minor tweaks at this time.
* Closes #342 - Automates featureCollection management. New method `OfflineFeaturesManager.getFeatureCollections()`.


## Version 2.8.2 - May 19, 2015
Expand Down
6 changes: 3 additions & 3 deletions dist/offline-edit-min.js

Large diffs are not rendered by default.

27 changes: 24 additions & 3 deletions dist/offline-edit-src.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! offline-editor-js - v2.9.0 - 2015-05-27
/*! offline-editor-js - v2.9.1 - 2015-05-29
* Copyright (c) 2015 Environmental Systems Research Institute, Inc.
* Apache License*/
/*jshint -W030 */
Expand Down Expand Up @@ -35,6 +35,9 @@ define([
attachmentsStore: null, // indexedDB for storing attachments
proxyPath: null, // by default we use CORS and therefore proxyPath is null

ENABLE_FEATURECOLLECTION: false, // Set this to true for full offline use if you want to use the
// getFeatureCollections() pattern of reconstituting a feature layer.

// Database properties
DB_NAME: "features_store", // Sets the database name.
DB_OBJECTSTORE_NAME: "features",// Represents an object store that allows access to a set of data in the IndexedDB database
Expand Down Expand Up @@ -1134,7 +1137,13 @@ define([

// We are currently only passing in a single deferred.
all(extendPromises).then(function (r) {
if(r.length === 0){

// DB already initialized
if(r.length === 0 && url){
// Initialize the internal featureLayerCollectionObject
if(this.ENABLE_FEATURECOLLECTION) {
layer._pushFeatureCollections();
}
callback(true, null);
}
else if(r[0].success && !url){
Expand All @@ -1146,15 +1155,27 @@ define([
if(success) {
this._featureLayers[message.__featureLayerURL] = layer;
layer.url = message.__featureLayerURL;

// Initialize the internal featureLayerCollectionObject
if(this.ENABLE_FEATURECOLLECTION) {
layer._pushFeatureCollections();
}
callback(true, null);
}
else {
console.error("getFeatureLayerJSON() failed.");
// NOTE: We have to have a valid feature layer URL in order to initialize the featureLayerCollectionObject
console.error("getFeatureLayerJSON() failed and unable to create featureLayerCollectionObject.");
callback(false, message);
}
}.bind(this));
}
else if(r[0].success){

// Initialize the internal featureLayerCollectionObject
if(this.ENABLE_FEATURECOLLECTION) {
layer._pushFeatureCollections();
}

callback(true, null);
}
}.bind(this));
Expand Down
2 changes: 1 addition & 1 deletion dist/offline-tiles-advanced-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/offline-tiles-advanced-src.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! offline-editor-js - v2.9.0 - 2015-05-27
/*! offline-editor-js - v2.9.1 - 2015-05-29
* Copyright (c) 2015 Environmental Systems Research Institute, Inc.
* Apache License*/
define([
Expand Down
2 changes: 1 addition & 1 deletion dist/offline-tiles-basic-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/offline-tiles-basic-src.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! offline-editor-js - v2.9.0 - 2015-05-27
/*! offline-editor-js - v2.9.1 - 2015-05-29
* Copyright (c) 2015 Environmental Systems Research Institute, Inc.
* Apache License*/
define([
Expand Down
2 changes: 1 addition & 1 deletion dist/offline-tpk-min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/offline-tpk-src.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! offline-editor-js - v2.9.0 - 2015-05-27
/*! offline-editor-js - v2.9.1 - 2015-05-29
* Copyright (c) 2015 Environmental Systems Research Institute, Inc.
* Apache License*/
/**
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "offline-editor-js",
"version": "2.9.0",
"version": "2.9.1",
"description": "Lightweight set of libraries for working offline with map tiles and ArcGIS feature services",
"author": "Andy Gup <[email protected]> (http://blog.andygup.net)",
"license": "Apache 2",
Expand Down
2 changes: 1 addition & 1 deletion samples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"appHomePage": "appcache-features.html",
"optimizedApiURL": "../samples/jsolib",
"arcGISBaseURL": "http://js.arcgis.com/3.11",
"version": "2.9.0",
"version": "2.9.1",
"private": true,
"description": "manifest generator project",
"repository": {
Expand Down

0 comments on commit 31a4d7f

Please sign in to comment.