Skip to content

Commit

Permalink
Merge pull request #347 from andygup/v2.9.1
Browse files Browse the repository at this point in the history
v2.9.1
  • Loading branch information
andygup committed May 29, 2015
2 parents 1c39790 + 31a4d7f commit 74a7b3b
Show file tree
Hide file tree
Showing 15 changed files with 137 additions and 41 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
Loading

0 comments on commit 74a7b3b

Please sign in to comment.