Skip to content

Commit

Permalink
feat(layer-loader): add option to change layer mode on reloading
Browse files Browse the repository at this point in the history
Related #9442
  • Loading branch information
AleksueiR committed May 4, 2015
1 parent 5b9f09e commit 59a9b33
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/js/RAMP/Modules/eventManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,7 @@ define([],
* @for LayerLoader
* @param event {Object}
* @param event.layerId {String} ESRI layer id to be reloaded
* @param event.mode {String} layer mode: ondemand or snapshot
*
*/
RELOAD_LAYER: "layerLoader/reload-layer",
Expand Down
4 changes: 4 additions & 0 deletions src/js/RAMP/Modules/layerLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,10 @@ define([
layerIndex = layerIndex + RAMP.layerCounts.base - RAMP.layerCounts.feature;
}

if (evt.mode) {
layerConfig.mode = evt.mode;
}

//generate new layer
switch (curlayer.ramp.type) {
case GlobalStorage.layerType.wms:
Expand Down

0 comments on commit 59a9b33

Please sign in to comment.