AnsweredAssumed Answered

Best way to omit missing data in client-side feature layer?

Question asked by tograh on Jan 8, 2019
Latest reply on Jan 9, 2019 by tograh

In the online example "Create a FeatureLayer with client-side graphics", it’s sizing a SimpleMarkerSymbol by the "mag" (magnitude) attribute of the data (earthquakes circa 2016).


For six features in Nevada, the value of "mag" is null.  As a result, it looks like the renderer is applying the default size of the SimpleMarkerSymbol (here, set to 20) instead of using the corresponding SizeVariable.  So all Nevada’s features missing data are size 20.


My requirement is to omit features with missing data.


In API version 4.6, I was setting the SimpleMarkerSymbol’s default size to 0, which worked.  All missing data was size 0.


In API version 4.10, when I set the default size to 0 (l. 185 of the example), no data is drawn for any feature—regardless of the value of "mag".


Is the 4.10 behavior correct?  If so, what’s the recommended way to omit missing data?  Pre-filter?