Event when all map layers load completed

10540
2
Jump to solution
07-07-2017 03:30 AM
UdyWa
by
New Contributor III

Hi,

Is there a event to fire when all the layers are loaded? Im trying to run goTo(point) on mapview.then( ) but it doesn't seems to work because even the map view is resolved the map is not ready yet. also map is not visual at that point.

Sample;

mapview.then(function(evt) {

                mapview.goTo({
                                           center: [-0.0797168289197368,51.7932728800697],
                                            zoom: 16
         });

});

0 Kudos
1 Solution

Accepted Solutions
ThomasSolow
Occasional Contributor III

Your sample works for me: JS Bin - Collaborative JavaScript Debugging 

You shouldn't have to wait for all layers to load in order to use .goTo, just the view.

View solution in original post

2 Replies
KenBuja
MVP Esteemed Contributor
ThomasSolow
Occasional Contributor III

Your sample works for me: JS Bin - Collaborative JavaScript Debugging 

You shouldn't have to wait for all layers to load in order to use .goTo, just the view.