Skip to content

Commit

Permalink
Merge pull request #364 from andygup/v2.9.5
Browse files Browse the repository at this point in the history
V2.9.5
  • Loading branch information
andygup committed Jul 15, 2015
2 parents e3b8029 + f38540d commit 87e136e
Show file tree
Hide file tree
Showing 19 changed files with 85 additions and 27 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# offline-editor-js - Changelog

## Version 2.9.5 - July 14, 2015

No breaking changes.

**Enhancements**
* In reference to #288, added tileLayer.showBlankTiles boolean property to both offlineTilesEnabler
and OfflineTilesEnablerLayer.

## Version 2.9.4.1 - July 10, 2015

Minor doc update. Fixed broken link in README.
Expand Down
2 changes: 1 addition & 1 deletion dist/offline-edit-min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/offline-edit-src.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! offline-editor-js - v2.9.4 - 2015-07-10
/*! offline-editor-js - v2.9.5 - 2015-07-14
* Copyright (c) 2015 Environmental Systems Research Institute, Inc.
* Apache License*/
/*jshint -W030 */
Expand Down
6 changes: 3 additions & 3 deletions dist/offline-tiles-advanced-min.js

Large diffs are not rendered by default.

19 changes: 16 additions & 3 deletions 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.4 - 2015-07-10
/*! offline-editor-js - v2.9.5 - 2015-07-14
* Copyright (c) 2015 Environmental Systems Research Institute, Inc.
* Apache License*/
define([
Expand Down Expand Up @@ -51,6 +51,13 @@ define([
isOnline = state; console.log("STATE IS: " + state);
}

/**
* Option to show/hide blank tile images. When using multiple basemap layers,
* if one has no tiles, this will display and cover another basemap storage which may have tiles.
* @type {boolean}
*/
this.showBlankTiles = true;

/**
* IMPORTANT! proxyPath is set to null by default since we assume Feature Service is CORS-enabled.
* All AGOL Feature Services are CORS-enabled.
Expand Down Expand Up @@ -138,7 +145,7 @@ define([
/* temporary URL returned immediately, as we haven't retrieved the image from the indexeddb yet */
var tileid = "void:/"+level+"/"+row+"/"+col;
var img = null;
this._tilesCore._getTiles(img,this._imageType,url,tileid,this.offline.store,query);
this._tilesCore._getTiles(img,this._imageType,url,tileid,this.offline.store,query,this.showBlankTiles);

return tileid;
},
Expand Down Expand Up @@ -806,9 +813,11 @@ O.esri.Tiles.TilesCore = function(){
* @param url the url of the tile
* @param tileid a reference to the tile's unique level, row and column
* @param store
* @param query Dojo Query
* @param showBlankTiles
* @private
*/
this._getTiles = function(image,imageType,url,tileid,store,query){
this._getTiles = function(image,imageType,url,tileid,store,query,showBlankTiles){
store.retrieve(url, function(success, offlineTile)
{ console.log("TILE RETURN " + success + ", " + offlineTile.url);
/* when the .getTileUrl() callback is triggered we replace the temporary URL originally returned by the data:image url */
Expand All @@ -824,6 +833,10 @@ O.esri.Tiles.TilesCore = function(){
console.log("found tile offline", url);
imgURL = "data:image/" + imageType +";base64," + offlineTile.img;
}
else if( !showBlankTiles ) {
console.log("showBlankTiles = false");
imgURL = "data:image/png;base64," + "iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAD8GlDQ1BJQ0MgUHJvZmlsZQAAOI2NVd1v21QUP4lvXKQWP6Cxjg4Vi69VU1u5GxqtxgZJk6XpQhq5zdgqpMl1bhpT1za2021Vn/YCbwz4A4CyBx6QeEIaDMT2su0BtElTQRXVJKQ9dNpAaJP2gqpwrq9Tu13GuJGvfznndz7v0TVAx1ea45hJGWDe8l01n5GPn5iWO1YhCc9BJ/RAp6Z7TrpcLgIuxoVH1sNfIcHeNwfa6/9zdVappwMknkJsVz19HvFpgJSpO64PIN5G+fAp30Hc8TziHS4miFhheJbjLMMzHB8POFPqKGKWi6TXtSriJcT9MzH5bAzzHIK1I08t6hq6zHpRdu2aYdJYuk9Q/881bzZa8Xrx6fLmJo/iu4/VXnfH1BB/rmu5ScQvI77m+BkmfxXxvcZcJY14L0DymZp7pML5yTcW61PvIN6JuGr4halQvmjNlCa4bXJ5z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AwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDDwAwMBPAABGrpAUwAAAABJRU5ErkJggg==";
}
else
{
image.style.borderColor = "green";
Expand Down
6 changes: 3 additions & 3 deletions dist/offline-tiles-basic-min.js

Large diffs are not rendered by default.

19 changes: 16 additions & 3 deletions 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.4 - 2015-07-10
/*! offline-editor-js - v2.9.5 - 2015-07-14
* Copyright (c) 2015 Environmental Systems Research Institute, Inc.
* Apache License*/
define([
Expand Down Expand Up @@ -51,6 +51,13 @@ define([
isOnline = state; console.log("STATE IS: " + state);
}

/**
* Option to show/hide blank tile images. When using multiple basemap layers,
* if one has no tiles, this will display and cover another basemap storage which may have tiles.
* @type {boolean}
*/
layer.showBlankTiles = true;

/**
* IMPORTANT! proxyPath is set to null by default since we assume Feature Service is CORS-enabled.
* All AGOL Feature Services are CORS-enabled.
Expand Down Expand Up @@ -106,7 +113,7 @@ define([

var img = null;

layer._tilesCore._getTiles(img,this._imageType,url,tileid,this.offline.store,query);
layer._tilesCore._getTiles(img,this._imageType,url,tileid,this.offline.store,query,layer.showBlankTiles);

return tileid;
};
Expand Down Expand Up @@ -722,9 +729,11 @@ O.esri.Tiles.TilesCore = function(){
* @param url the url of the tile
* @param tileid a reference to the tile's unique level, row and column
* @param store
* @param query Dojo Query
* @param showBlankTiles
* @private
*/
this._getTiles = function(image,imageType,url,tileid,store,query){
this._getTiles = function(image,imageType,url,tileid,store,query,showBlankTiles){
store.retrieve(url, function(success, offlineTile)
{ console.log("TILE RETURN " + success + ", " + offlineTile.url);
/* when the .getTileUrl() callback is triggered we replace the temporary URL originally returned by the data:image url */
Expand All @@ -740,6 +749,10 @@ O.esri.Tiles.TilesCore = function(){
console.log("found tile offline", url);
imgURL = "data:image/" + imageType +";base64," + offlineTile.img;
}
else if( !showBlankTiles ) {
console.log("showBlankTiles = false");
imgURL = "data:image/png;base64," + "iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAD8GlDQ1BJQ0MgUHJvZmlsZQAAOI2NVd1v21QUP4lvXKQWP6Cxjg4Vi69VU1u5GxqtxgZJk6XpQhq5zdgqpMl1bhpT1za2021Vn/YCbwz4A4CyBx6QeEIaDMT2su0BtElTQRXVJKQ9dNpAaJP2gqpwrq9Tu13GuJGvfznndz7v0TVAx1ea45hJGWDe8l01n5GPn5iWO1YhCc9BJ/RAp6Z7TrpcLgIuxoVH1sNfIcHeNwfa6/9zdVappwMknkJsVz19HvFpgJSpO64PIN5G+fAp30Hc8TziHS4miFhheJbjLMMzHB8POFPqKGKWi6TXtSriJcT9MzH5bAzzHIK1I08t6hq6zHpRdu2aYdJYuk9Q/881bzZa8Xrx6f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MGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDBgwIABAwYMGDDwAwMBPAABGrpAUwAAAABJRU5ErkJggg==";
}
else
{
image.style.borderColor = "green";
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.4 - 2015-07-10
/*! offline-editor-js - v2.9.5 - 2015-07-14
* Copyright (c) 2015 Environmental Systems Research Institute, Inc.
* Apache License*/
/**
Expand Down
7 changes: 4 additions & 3 deletions doc/offlinetilesenabler.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ Constructor | Description
`O.esri.Tiles.OfflineTilesEnabler()` | Creates an instance of the offlineTilesEnabler class. This library allows you to extend an ArcGISTiledMapServiceLayer with partial offline capability as well as manage the online/offline resynchronization process.

###Properties
Property | Description
--- | ---
`layer.offline.proxyPath`| The default is `null`. If you have a CORS-enabled service then use the default. Don't forget to check your proxy configuration to allow connections for all possible services that you might be using. More information on using proxies with ArcGIS can be found here: [https://developers.arcgis.com/javascript/jshelp/ags_proxy.html](https://developers.arcgis.com/javascript/jshelp/ags_proxy.html).
Property | Value | Description
--- | --- | ---
`layer.showBlankTiles`| `true` | By default the library will show a 256x256 grey PNG image that says "NO TILE". To override this behavior, especially if you are using multiple tile layers and you don't want the grey "NO TILE" image to interfere then set this property to `false`.
`layer.offline.proxyPath`| `null` | The default is `null`. If you have a CORS-enabled service then use the default. Don't forget to check your proxy configuration to allow connections for all possible services that you might be using. More information on using proxies with ArcGIS can be found here: [https://developers.arcgis.com/javascript/jshelp/ags_proxy.html](https://developers.arcgis.com/javascript/jshelp/ags_proxy.html).

###Methods
Methods | Returns | Description
Expand Down
7 changes: 4 additions & 3 deletions doc/offlinetilesenablerlayer.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ Constructor | Description
`O.esri.Tiles.OfflineTileEnablerLayer(url,callback,state)` | Creates an instance of the offlineTileEnabler class. This library allows you to extend an ArcGISTiledMapServiceLayer with offline capability as well as manage the online/offline resynchronization process. Any Esri basemap REST endpoint should work. The state property is a boolean for specifying if the application is intializing the layer online (true) or offline (false). When you first load the map you should set this property to `true`.

###Properties
Property | Description
--- | ---
`layer.offline.proxyPath`| For CORS enabled servers this can be set to `null`. The default is null. All ArcGIS Online-based services uses CORS. If you are using a non-CORS enabled server you'll need a proxy. Don't forget to check your proxy configuration to allow connections for all possible services that you might be using. More information on using proxies with ArcGIS can be found here: [https://developers.arcgis.com/javascript/jshelp/ags_proxy.html](https://developers.arcgis.com/javascript/jshelp/ags_proxy.html).
Property | Value | Description
--- | --- | ---
`layer.showBlankTiles`| `true` | By default the library will show a 256x256 grey PNG image that says "NO TILE". To override this behavior, especially if you are using multiple tile layers and you don't want the grey "NO TILE" image to interfere then set this property to `false`.
`layer.offline.proxyPath`| `null` | The default is `null`. If you have a CORS-enabled service then use the default. Don't forget to check your proxy configuration to allow connections for all possible services that you might be using. More information on using proxies with ArcGIS can be found here: [https://developers.arcgis.com/javascript/jshelp/ags_proxy.html](https://developers.arcgis.com/javascript/jshelp/ags_proxy.html).

###Methods
Methods | Returns | Description
Expand Down
9 changes: 8 additions & 1 deletion lib/tiles/OfflineTilesEnablerLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ define([
isOnline = state; console.log("STATE IS: " + state);
}

/**
* Option to show/hide blank tile images. When using multiple basemap layers,
* if one has no tiles, this will display and cover another basemap storage which may have tiles.
* @type {boolean}
*/
this.showBlankTiles = true;

/**
* IMPORTANT! proxyPath is set to null by default since we assume Feature Service is CORS-enabled.
* All AGOL Feature Services are CORS-enabled.
Expand Down Expand Up @@ -135,7 +142,7 @@ define([
/* temporary URL returned immediately, as we haven't retrieved the image from the indexeddb yet */
var tileid = "void:/"+level+"/"+row+"/"+col;
var img = null;
this._tilesCore._getTiles(img,this._imageType,url,tileid,this.offline.store,query);
this._tilesCore._getTiles(img,this._imageType,url,tileid,this.offline.store,query,this.showBlankTiles);

return tileid;
},
Expand Down
Loading

0 comments on commit 87e136e

Please sign in to comment.