Select to view content in your preferred language

remove definitionExpression after uncheck checkbox

755
1
Jump to solution
01-18-2022 04:10 AM
Vakhtang_Zubiashvili
Frequent Contributor

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
Frequent Contributor

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
Frequent Contributor

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

0 Kudos