I am loading a Webmap made with ArcGIS online.
I can get the center from map.portalItem.extent, but how do I find the zoom?
app.map=new WebMap({ portalItem: { id: myId }});
app.map.load().then(function() {
app.center[0]=app.map.portalItem.extent.center.longitude;
app.center[1]=app.map.portalItem.extent.center.latitude;
app.zoom=???
});
...
app.mapView.when(function() { app.activeView.goTo({ center:app.center, zoom: app.zoom }) });