remove definitionExpression after uncheck checkbox

446
1
Jump to solution
01-18-2022 04:10 AM
Vakhtang_Zubiashvili
Occasional Contributor III

Hi guys,

I have custom menu in my application.

I have layer which definition expression should change after i check or uncheck menu check Box:

 

if (document.getElementById("wyaldeni_tbilisi").checked == true) {
  csvLayer.definitionExpression = "Pipeline_Subtype = 3";
}
else
{
  csvLayer.definitionExpression = "";
};

 

check works fine, but when i uncheck box nothing happens, definitionExpression stays same.

What i do wrong?

 

Thanks in advance

0 Kudos
1 Solution

Accepted Solutions
JeffreyWilkerson
Occasional Contributor III

Your layer needs to be triggered to refresh I think, and I believe csvLayer.refresh() will force it to do just that.

View solution in original post

0 Kudos
1 Reply
JeffreyWilkerson
Occasional Contributor III

Your layer needs to be triggered to refresh I think, and I believe csvLayer.refresh() will force it to do just that.

0 Kudos