Select to view content in your preferred language

Set definition expression in 4.24 version of ArcGIS API for JavaScript

416
2
08-31-2022 12:27 AM
ec_inser
New Contributor

Hello,
When migrating to version 4.24 of ArcGIS API for JavaScript, I can not change the definition expression of a feature layer on a map view. I try to change the definition expression once the layer is loaded on the map. Have you noticed this problem ?
Thanks for your answer,
Eliseo

0 Kudos
2 Replies
Noah-Sager
Esri Regular Contributor

Hi @ec_inser, thanks for posting here. Can you share a simple sample app that reproduces the issue on something like Codepen? Or can you just share the definition expression code here? Also, did you migrate from another 4x version, or from 3x?

0 Kudos
UndralBatsukh
Esri Regular Contributor

Hi there, 

There are no known problems with setting definitionExpression on a layer after the layer is loaded. This very simple codepen shows that it is working: https://codepen.io/U_B_U/pen/dyebObx?editors=100

The app waits for the layerView is created for the layer and sets the definition expression. 

0 Kudos