Change Default Buffer Size based on Combo Box

1303
2
Jump to solution
12-09-2014 07:09 AM
CraigLinn
New Contributor III

I have my buffer drawing to the size of my selection in a combo box however when I select a value greater than a radius of 4 miles it does not draw the larger circle and reverts back to the radius of 4. I assume this is some default somewhere I just can't seem to locate or how to modify it.  Please see attached html for full code.  Thank you for any suggestions.  Long range plan is to then export selection to a table.

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
TimWitt2
MVP Alum

Craig,

replace selfbuf with BufferSelection here:

   circle = new Circle({
            center: evt.mapPoint,
            geodesic: true,
            radius: selbuf,
            radiusUnit: "esriMiles"
          });

Tim

View solution in original post

2 Replies
TimWitt2
MVP Alum

Craig,

your issue is that you get the index number from your selection, not the actual number. I.E if I use your 0 option I will get a 0 back because it is the first number in your index. When I choose 100 I will get 4 back since it is the 4th position in your index.

Hope this helps!

Tim

0 Kudos
TimWitt2
MVP Alum

Craig,

replace selfbuf with BufferSelection here:

   circle = new Circle({
            center: evt.mapPoint,
            geodesic: true,
            radius: selbuf,
            radiusUnit: "esriMiles"
          });

Tim