Select to view content in your preferred language

ArcGIS JS 4.9 MapView.when not getting called

745
2
11-30-2018 03:21 AM
PraveenTirumandyam
New Contributor

Hello,

I am creating a MapView but, am not able to see the same. When initially I looked into the browser tools what I found was that canvas element that is created by ArcGIS JS api is not getting created under the view-root. Moreover, there were no queries to load webtiles.

To check is view is getting created, I wrote callbacks for MapView.when. But, I am not getting either callback or, errorback.

What might be happening here? I am fully flummoxed.

0 Kudos
2 Replies
RobertScheitlin__GISP
MVP Emeritus

Please provide a sample that demonstrates your issue.

Angelo_BryanPerito
New Contributor

its been a while since you posted this. did you able to solve the issue? i also got the same problem


require(["esri/Map","esri/views/MapView"],(Map,MapView)=>{
   var map  = new Map({ basemap:"topo"});
   var view = new MapView({map:map,"container":"map"});
   view.when(()=>{
     alert('loaded'); //this was not being invoked.
  });
});

alternately, i include center(lat/lon) and zoom level(17), but still doesnt do anything.. no request happening on networktab of chrome. but it does load the .js files. 

0 Kudos