Can I modify the Situation Awareness widget in Web AppBuilder Developer to take a negative buffer value? or maybe an option to do an inside buffer vs. outside buffer or both if entering a positive buffer value?
I am looking for a solution to do a negative buffer on a land parcel polygon to show a 12 foot setback line for constructing structures. A structure can't be closer than 12 feet to the property line. I currently use both the Situation Awareness widget and Developer version of Web AppBuilder. If the widget could take a negative value, it would be an easy way to show the setback so a line could be sketched over it with a drawing widget.
Solved! Go to Solution.
Gerald,
You are correct. You will have to modify this line in the Widget.js file.
if (dist1 > 0) {
to
if (dist1 <= parseFloat(this.config.bufferRange.minimum.toString().replace(/,/g, ""), 10)) {
Gerald,
The widgets settings dialog is set to not allow negative numbers but you can edit the widgets config.json manually to set the bufferRange minimum:
"bufferRange": {
"minimum": -30,
"_default": 0,
"maximum": 100
},
I changed the config but it is not reflected in the widget interface within the running app?
Gerald,
You are correct. You will have to modify this line in the Widget.js file.
if (dist1 > 0) {
to
if (dist1 <= parseFloat(this.config.bufferRange.minimum.toString().replace(/,/g, ""), 10)) {