WebApp Builder Dev URL Parameter showLayers

185
0
01-28-2021 10:12 AM
BrianLeroux
Regular Contributor

I am trying to get the showLayers and hideLayers url parameters to work to no avail. I tried using layer ID and name but neither seem to work. I am using WAB version 2.11. Anyone else able to get layer visibility parameter to work? Looks like it is trying to work but is possibly generating the error seen below.

https://developers.arcgis.com/web-appbuilder/guide/xt-app-url-parameters-for-dev.htm

Item does not exist or is inaccessible.
init.js:115 TypeError: Cannot read property 'getItemData' of null
    at Object.<anonymous> (LayerInfoForMapService.js?wab_dv=2.11:75)
    at init.js:64
    at l (init.js:108)
    at k (init.js:108)
    at e.resolve (init.js:110)
    at Object.<anonymous> (LayerInfo.js?wab_dv=2.11:1196)
    at init.js:64
    at l (init.js:108)
    at k (init.js:108)
    at e.v.reject (init.js:110) "TypeError: Cannot read property 'getItemData' of null
    at Object.<anonymous> (https://gistest.amica.com/catviewer/jimu.js/LayerInfos/LayerInfoForMapService.js?wab_dv=2.11:75:35)
    at https://js.arcgis.com/3.27/init.js:64:337
    at l (https://js.arcgis.com/3.27/init.js:108:277)
    at k (https://js.arcgis.com/3.27/init.js:108:203)
    at e.resolve (https://js.arcgis.com/3.27/init.js:110:280)
    at Object.<anonymous> (https://gistest.amica.com/catviewer/jimu.js/LayerInfos/LayerInfo.js?wab_dv=2.11:1196:23)
    at https://js.arcgis.com/3.27/init.js:64:337
    at l (https://js.arcgis.com/3.27/init.js:108:277)
    at k (https://js.arcgis.com/3.27/init.js:108:203)
    at e.v.reject (https://js.arcgis.com/3.27/init.js:110:488)
    ----------------------------------------
    rejected at a (https://js.arcgis.com/3.27/init.js:109:174)
    at l (https://js.arcgis.com/3.27/init.js:108:436)
    at k (https://js.arcgis.com/3.27/init.js:108:203)
    at e.resolve (https://js.arcgis.com/3.27/init.js:110:280)
    at Object.<anonymous> (https://gistest.amica.com/catviewer/jimu.js/LayerInfos/LayerInfo.js?wab_dv=2.11:1196:23)
    at https://js.arcgis.com/3.27/init.js:64:337
    at l (https://js.arcgis.com/3.27/init.js:108:277)
    at k (https://js.arcgis.com/3.27/init.js:108:203)
    at e.v.reject (https://js.arcgis.com/3.27/init.js:110:488)
    at Object.<anonymous> (https://gistest.amica.com/catviewer/jimu.js/LayerInfos/LayerInfo.js?wab_dv=2.11:1446:35)
    ----------------------------------------
Error
    at e.then.b.then (https://js.arcgis.com/3.27/init.js:111:97)
    at Object._needToRefresh (https://gistest.amica.com/catviewer/jimu.js/LayerInfos/LayerInfoForMapService.js?wab_dv=2.11:74:28)
    at Object.init (https://gistest.amica.com/catviewer/jimu.js/LayerInfos/LayerInfoForMapService.js?wab_dv=2.11:60:12)
    at Object.<anonymous> (https://gistest.amica.com/catviewer/jimu.js/LayerInfos/LayerInfos.js?wab_dv=2.11:508:21)
    at Object.forEach (https://js.arcgis.com/3.27/init.js:71:486)
    at Object._initSpecifiedLayerInfos (https://gistest.amica.com/catviewer/jimu.js/LayerInfos/LayerInfos.js?wab_dv=2.11:505:13)
    at Object._initLayerInfos (https://gistest.amica.com/catviewer/jimu.js/LayerInfos/LayerInfos.js?wab_dv=2.11:495:12)
    at Object.constructor (https://gistest.amica.com/catviewer/jimu.js/LayerInfos/LayerInfos.js?wab_dv=2.11:52:12)
    at new <anonymous> (https://js.arcgis.com/3.27/init.js:201:85)
    at Function.clazz.getInstanceSyncForInit (https://gistest.amica.com/catviewer/jimu.js/LayerInfos/LayerInfos.js?wab_dv=2.11:1179:29)"
0 Kudos
0 Replies