-
-
Notifications
You must be signed in to change notification settings - Fork 278
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Control dynamic map service sublayers
These changes allow the user to have granular control over each subLayer in a dynamic Map service. Now, instead of having to just use the name of the layer in the map, you can override it to whatever you'd like. you can also redefine the min/max scale of the subLayer. see the layerInfo properties defined here: https://developers.arcgis.com/javascript/jsapi/layerinfo-amd.html In addition to the subLayerInfo support, i've added two other properties to the layerControlLayerInfos object. 1) subLayerInfos : array of layerInfos that should override the dynamic map service's default layerInfos 2) excludedLayers : an array of layer ids that should not be exposed in the map service 3) includeUnspecifiedLayers: boolean --> if true, then all layers in the dynamic map service will be added, not just the ones listed in subLayerInfos. the excludeLayers list will still be honored. layerControlLayerInfos: { //layerIds: [0, 2, 4, 5, 8, 9, 10, 12, 21] includeUnspecifiedLayers : true, excludedLayers : [1,3], subLayerInfos: [{id:0,name:"Layer 1",defaultVisibility:false},{id:2,name:"Layer 2"},{id:4,name:"Layer 3"},{id:5,name:"Layer 4"},{id:8,name:"Layer 5"},{id:9},{id:10},{id:12,name:"Layer 6"},{id:21,name:"Layer 7"}] },
- Loading branch information
1 parent
9c93231
commit 4b3156a
Showing
5 changed files
with
109 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters