FeatureLayer 'update-start' fires once when in visible scale range

2732
4
08-24-2015 10:58 AM
by Anonymous User
Not applicable

Hi -

I have a FeatureLayer in a map that starts zoomed outside of its visible scale range. The first time the layer comes into its visible range, the 'update-start' event is triggered. Every time thereafter, an 'update' event is triggered (deprecated, I know). Never again does the layer coming in or out of scale trigger 'update-start', therefore I assumed it was firing that first time because the layer was being added to the map.

However, the map 'layer-add' event for this layer does not fire when the layer comes into its visible scale the first time. That event fires when the map initially loads on the screen, and the layer is out of visible scale.

Any input on what is triggering the event?

0 Kudos
4 Replies
TimWitt2
MVP Alum

Sarah,

in what mode (onDemand, Snapshot...) do you add your layer?

Tim

0 Kudos
by Anonymous User
Not applicable

Snapshot

0 Kudos
TimWitt2
MVP Alum

Maybe because the first time it actually draws the layer, it queries the server, which counts as a refresh. Once it has been drawn the layer information remains in the cache and doesn't need to query the server and therefor doesn't "refresh", which would fire the update-start event?

It's just an idea

0 Kudos
by Anonymous User
Not applicable

Hm, yes, that's a good point!

0 Kudos