AnsweredAssumed Answered

Configure weather widget

Question asked by VPS748 on May 18, 2017

Hello all,

I use Operations Dashboard, and use weather widget from dashboard-samples/weatherWidget at master · Esri/dashboard-samples · GitHub 

The widget as is runs very well - I have wundreground key and can add it to my operation view.

Then I try to add configuration page to the widget.

I do next:
- in manifest weather.json I changed the title, and added

   "path": "WeatherWidgetConfig.html"

- I created simple WeatherWidgetConfig.html
- I created simple WeatherWidgetConfig.js file with only
hostReady: function ()

Now when widget started I in debugger in weather.js hostReady see that this.mapWidgetProxy === undefined.


Then I try next modifications to hostReady:


hostReady: function ()
var self=this;
   console.log("getMapWidgetProxies", mapWidgetProxies[0]);
   self.config.mapWidgetProxy = mapWidgetProxies[0];

now in weather.js hostReady I see that this.mapWidgetProxy has value, but nevertheless
failed (endless cycle).


How can I receive valid mapWidgetProxy from configuration page?


I attached source files.

Thank you in advance.