StreamLayer purgeOptions.age ignored (Javascript API 3.x)

568
2
05-13-2019 02:29 AM
best-esri-de
Esri Contributor

Dear all,

I would like to change purgeOptions.age of a StreamLayer after it was already added to the map:

   layer.purgeOptions.age = 1;

But the value is just ignored and older graphics are not removed.

On the other hand if I set purgeOptions.displayCount to a fixed value it works as expected.

It also works if I set purgeOptions.age before the StreamLayer is added to the map. But unfortunately that is not an option for my current use case.

Any hints?

Best regards,

Beate

0 Kudos
2 Replies
KenBuja
MVP Esteemed Contributor

In 3.x, you can't directly change properties on something that has already been created. You usually have to use a setProperty method. In this case, there is the setPurgeInterval method you could use.

0 Kudos
best-esri-de
Esri Contributor

Unfortunately setPurgeInterval does not change purgeOptions.age.
And I can change the Property layer.purgeOptions.displayCount directly, but the change of layer.purgeOptions.age is ignored.

0 Kudos