ListView Widget Help

918
24
12-17-2019 03:08 PM
SamLee1
New Contributor
0 Kudos
24 Replies
KenBuja
MVP Honored Contributor

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?

0 Kudos
SamLee1
New Contributor

Hello Ken,

Thanks for the response. 

What do you mean by that?  I went through all the steps.

Was that one of them?

0 Kudos
KenBuja
MVP Honored Contributor

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.

0 Kudos
SamLee1
New Contributor

Settings.js:

I do not have a config.js in my settings folder. There wasn't a step for that in the tutorial.

0 Kudos
KenBuja
MVP Honored Contributor

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?

0 Kudos
SamLee1
New Contributor

Yes I did use the debugger. There is no value returned as there is an error.

config.json file:

0 Kudos
KenBuja
MVP Honored Contributor

What does the debugger show for this.config?

0 Kudos
SamLee1
New Contributor

I do not get what you are getting as there is no debugger in my Chrome tools.

0 Kudos
KenBuja
MVP Honored Contributor

In Chrome, it's under the Sources tab.

0 Kudos