Event listner for when mapview is rerender on browser

548
1
Jump to solution
09-16-2021 04:53 AM
KenjooYeap
New Contributor II

Hi, 

I am trying to use the JSAPI v4.20 to create a loading graphic when the browser is updating the map. I tried using the "after-add" event  and realize that the "after-add" event is triggered when the layer is added to the mapView object but it could still take a while until the browser actually renders the layer.

Is there an event that can be listened to on when the browser completes the rerender? 

Thanks!

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
KenjooYeap
New Contributor II

Found this event which was what I needed. 

    view.on("layerview-create", function (event) {
      console.log("layerView added");
    });

 

View solution in original post

0 Kudos
1 Reply
KenjooYeap
New Contributor II

Found this event which was what I needed. 

    view.on("layerview-create", function (event) {
      console.log("layerView added");
    });

 

0 Kudos