Custom Widget Works In Testing Not In Live

441
1
Jump to solution
11-04-2016 08:14 AM
Labels (1)
BrianO_keefe
Regular Contributor II

So when I visit http://<mycomputername>.main.domainname.org:3344/webappviewer/?config=sample-configs/config-demo.jso... I get the widget working just fine. BUT... If I put the Widget INTO a Web Map using WAB then I get this...

I'm lost... it was working fine... and then it stopped. Nothing changed in the code... it just stopped.

I've added the widget in a ZIP file.

0 Kudos
1 Solution

Accepted Solutions
BrianO_keefe
Regular Contributor II

Got it!

I had to wrap the on(this.clearGraphics...) piece like so...

//Setup button click handlers
 this.own(on(this.clearGraphics, "click", lang.hitch(this, function() {
 if (this.map) {
 this.map.graphics.clear();
 }
 })));

It works now.

View solution in original post

0 Kudos
1 Reply
BrianO_keefe
Regular Contributor II

Got it!

I had to wrap the on(this.clearGraphics...) piece like so...

//Setup button click handlers
 this.own(on(this.clearGraphics, "click", lang.hitch(this, function() {
 if (this.map) {
 this.map.graphics.clear();
 }
 })));

It works now.

0 Kudos