I would like to access the map object from my console (and maybe also widget objects). So far I could only make that by inserting a breakpoint in some widgets code and use the this.map option to get my maps properties. Is there a way to do that easier? (Exuse me if this is too straightforward...)
Benedek,
If you use _widgetManager.getWidgetByLabel('Enhanced Search') when you have launched your app (not in the standard builder mode) then you can access the widget object.
Sure just use "window._widgetManager.map"
I could find window.__viewerMap for the map object!, and that's great! But still don't really know how to refer for widgets in the console...
Yeah, my bad - I saw "browser console" and assumed you we're looking for that. I don't develop with the WAB, but it's still JavaScript, so you could certainly debug a deployed app using the browser console, which is what I thought you were trying to do!
Chris,
The screenshot you have sent is relevant in "native" Javascript API applications, but not in WebApp Builder Applications. But thanks, anyways!
That's right, Robert! Could you give me a hint maybe?
I think he was asking how to access the map object and its properties from the consoles command line.
You mentioned the browser's console - are you looking for more than this?
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.