Find Zoom level in WebMap

171
0
08-08-2019 03:06 PM
WilliamFerster
New Contributor

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 }) });
0 Kudos
0 Replies