I am going through this tutorial and I keep getting this error:
Tutorial: Create a ListView widget—Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developers
Attached is the code.
The first error points to line 47
layer.queryFeatures(query, lang.hitch(this, function(featureSet) {
which means that "layer" is undefined. You get that earlier at line 39
var layer = this.map.getLayer(this.config.layerId);
Have you set the layerId property in the config to a valid layer in the map?
Hello Ken,
Thanks for the response.
What do you mean by that? I went through all the steps.
Was that one of them?
What do the config.js file and the Settings.js file in the settings folder look like? Does they contain an entry for layerId? This is mentioned in the section "Customize the Settings page". This is how this.config gets variables assigned.
Settings.js:
I do not have a config.js in my settings folder. There wasn't a step for that in the tutorial.
Sorry, that should have been config.json.
Have you gone into the debugger in the Developer Tools and determined what value is being returned for this.config.layerId?
Yes I did use the debugger. There is no value returned as there is an error.
config.json file:
What does the debugger show for this.config?
I do not get what you are getting as there is no debugger in my Chrome tools.
In Chrome, it's under the Sources tab.