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
});});
Solved! Go to Solution.
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.
Take a look at Rene Rubalcava's blog post on this: Quick Tip: ArcGIS API 4 for JS - When stuff is ready? - odoenet
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.