I was wondering if it is possible to programmatically change the config search layer based on a condition being met. I know you can access a search layer by its name using:
this.config.layers.name === "Name of the Search Layer";
What I'm trying to do is set it to a particular search layer in my config. Any help programmatically changing this would be great.
Solved! Go to Solution.
Martin,
You can use the code below. Where X is equal to the index (number) of the layer you want to switch to (i.e first layer in the drop down is 0, etc, etc).
this.onAttributeLayerChange(X);
Martin,
You can use the code below. Where X is equal to the index (number) of the layer you want to switch to (i.e first layer in the drop down is 0, etc, etc).
this.onAttributeLayerChange(X);
Thanks Robert, that's exactly what I needed.