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...)
You mentioned the browser's console - are you looking for more than this?
Chris,
I think he was asking how to access the map object and its properties from the consoles command line.
That's right, Robert! Could you give me a hint maybe?
Benedek,
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...
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.
Thank you Robert, but it seems I don't have a _widgetManager object. I am using WAB version 1.3 with v3.14 of the JS API.
Benedek,
Strange I get the _widget manager and am using the same WAB version. You will not be able to get the _widgetManager widgets without launching the app by clicking launch:
I have clicked launch, but still no success... What am I doing wrong?