WebApp Builder (Developer) Two Geoprocessing Widgets

4026
2
Jump to solution
03-01-2015 08:59 AM
travisbock
New Contributor

I am having a problem with using two geoprocessing widgets in the developer edition of the webapp builder.  Both widgets operate correctly alone however when two gp widgets are placed in the same web map running one seems to break the other.  Both widgets required drawing a polygon and that is where the problem occurs. 

First, I run either widget successfully getting my desired result.  Then, I go and attempt to run the other widget and upon drawing my polygon it disappears.  I can start drawing but once I finish the polygon by double click or just by releasing, depending on the drawing tool selected, the shape I have drawn just disappears.   The order which the tools are run does not matter.  The problem occurs with whichever is run second.

Has anyone else experienced this and/or know of a workaround?

1 Solution

Accepted Solutions
JeremieCornet1
Occasional Contributor II

After watching the widget code, it seems that the draw layer used for drawing param takes the param name as id.

I think your 2 widget's parameters have the same name and so the 2 draw widgets try to use the same layer id.

View solution in original post

2 Replies
SimonFisher
Occasional Contributor II

My guess is you will have to copy the gp widget and rename it to something else, including the folder, and internal names in the config and js files.  Otherwise the same widget is duplicated and it will cause dojo/js conflicts where only the first widget run will work properly.

0 Kudos
JeremieCornet1
Occasional Contributor II

After watching the widget code, it seems that the draw layer used for drawing param takes the param name as id.

I think your 2 widget's parameters have the same name and so the 2 draw widgets try to use the same layer id.